Loading

Unofficial FAQ (w/Answers)

General Discussion around Collabtive

Unofficial FAQ (w/Answers)

Postby Steiner » 07.08.2009, 21:42

Hello, I'm Steiner. (I am American although my name might advise otherwise, lol)

I love this script so much that I'm going to help answer some questions... feel free to ask your own questions here as well! I have this thread being watched so I'll get an email and reply as quickly as possible.

I'm going expand upon this thread as I come across things to make a somewhat unofficial FAQ. Feel free to add or comment my ideas, changes and/or answers.
Last edited by Steiner on 07.08.2009, 22:36, edited 1 time in total.
Steiner
 
Posts: 16
Joined: 15.05.2009, 00:33
Location: Buffalo, NY

SMTP, Gmail, non-phpmail() LAMP stacks

Postby Steiner » 07.08.2009, 21:49

Q: Does Collabtive support SMTP clients like gmail and other services requiring it to be secure and state ports?

A: Ok, yes this wonderful script does support SMTP on that level!

As most SMTP classes these days it allows the ssl:// protocol and :[port#] suffix.

Simply go into System administration, then down to the email settings.

Set Method to "SMTP", and in the Server field put;
Code: Select all
ssl://smtp.gmail.com:465

or
Code: Select all
ssl://smtp.gmail.com:587


As for the SMTP username, this will be the full email of a standing account, ex: yourname@domain.com.
And for SMTP password, this will be the same as if you were logging into your email.

NOTE: If using SSL (like gmail for instance) regardless of what you put in the Sender e-mail field, it will default to the SMTP username, however the Sender name will still reflect.
------------------
This also stands for other SMTP methods seeking ports and the secure linking... but this should be enough to wrap your heads around what needs to be done to make it work.
Last edited by Steiner on 07.08.2009, 22:33, edited 2 times in total.
Steiner
 
Posts: 16
Joined: 15.05.2009, 00:33
Location: Buffalo, NY

Notification, e-mail text format

Postby Steiner » 07.08.2009, 22:24

Q: Can we change the format in which our message emails are sent to the users and clients?

A: Of course!

Though it will take a little work on your end... since this is one of the very few things that isn't in a .tpl file.

Open /managemessage.php from your install root.
And somewhere around line:114 you will see a comment
Code: Select all
                if (!empty($user["email"]))
                {
                    if (is_array($sendto))
                    {
                        if (in_array($user["ID"], $sendto))
                        {
                            // send email
                            $themail = new emailer($settings);
                            $themail->send_mail($user["email"], "Message was posted", $message . " <a href = \"" . $url . "managemessage.php?action=showmessage&id=$id&mid=$themsg\">$title</a>");
                        }
                    }
                    else
                    
{
                        // send email
                        $themail = new emailer($settings);
                        $themail->send_mail($user["email"], "Message was posted", $message . " <a href = \"" . $url . "managemessage.php?action=showmessage&id=$id&mid=$themsg\">$title</a>");
                    }
                } 


Change how you see fit.
-----------------------------------
Example of my ../managemessage.php and ../include/class.emailer.php
Pay attention to the ../include/class.emailer.php changes, because this script users mysql_real_escape_string() in most of it's sql queries, so we have to drop the slashes in the email.

../managemessage.php
  • Added $project_obj = new project(); under //create message object
  • Added $project_info = $project_obj->getProject($id); to add the project info into our email template
  • Tweaked Template
Code: Select all

                if 
(!empty($user["email"]))
                {
                    $project_obj = new project();
                    $project_info = $project_obj->getProject($project['ID']);

                    if (is_array($sendto))
                    {
                        if (in_array($user["ID"], $sendto))
                        {
                            // send email
                            $themail = new emailer($settings);
                            $themail->send_mail($user["email"], "Message Regarding Project \"{$project_info['name']}\": $title", $message . "<br /><br /><a href = \"" . $url . "managemessage.php?action=showmessage&id=$id&mid=$themsg\">Reply Here</a>");
                        }
                    }
                    else
                    
{
                        // send email
                        $themail = new emailer($settings);
                        $themail->send_mail($user["email"],"Message Regarding Project \"{$project_info['name']}\": $title", $message  . "<br /><br /><a href = \"" . $url . "managemessage.php?action=showmessage&id=$id&mid=$themsg\">Reply Here</a>");
                    }
                }
 


../include/class.emailer.php
  • Added stripslashes() to $mailer->Subject & $mailer->Body
Code: Select all
<?php
/**
 * This class provides methods to handle emailing
 *
 * @author Open Dynamics <info@o-dyn.de>
 * @name emailer
 * @version 0.4.8
 * @package Collabtive
 * @link http://www.o-dyn.de
 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v3 or later
 */
class emailer
{
    private $from;
    private $mailsettings;

    function __construct($settings)
    {
        $this->mailsettings = $settings;
    }


    /**
     * Send an email to a member
     *
     * @param string $to Recipient's email address
     * @param string $subject Subjectline of the mail
     * @param string $text Textbody of the mail, HTML allowed
     * @return bool
     */
    function send_mail($to, $subject, $text)
    {
        //create PHP Mailer object
        $mailer = (object) new PHPmailer();
        //setup PHPMailer
        $mailer->From = $this->mailsettings["mailfrom"];
        $mailer->FromName = $this->mailsettings["mailfromname"];  
        $mailer
->AddAddress($to);
        $mailer->Subject = stripslashes($subject);
        $mailer->Body = stripslashes($text);
        //send mail as HTML
        $mailer->IsHTML(true);
        //set charset
        $mailer->CharSet = "utf8";
        //set mailing method... mail, smtp or sendmail
        $mailer->Mailer = $this->mailsettings["mailmethod"];
        //if it's smtp , set the smtp server
        if($this->mailsettings["mailmethod"] == "smtp")
        {
            $mailer->Host = $this->mailsettings["mailhost"];
            //setup SMTP auth
            if($this->mailsettings["mailuser"] and $this->mailsettings["mailpass"])
            {
                $mailer->Username = $this->mailsettings["mailuser"];
                $mailer->Password = $this->mailsettings["mailpass"];
                $mailer->SMTPAuth = true;
            }
        
        
}
        
        if 
($mailer->Send())
        {
            return true;
        }
        else
        
{
            return false;
        }
    }
}

?>
Steiner
 
Posts: 16
Joined: 15.05.2009, 00:33
Location: Buffalo, NY

Re: Unofficial FAQ (w/Answers)

Postby Philipp » 11.08.2009, 03:46

Stickied this
User avatar
Philipp
Site Admin
 
Posts: 1118
Joined: 14.12.2007, 03:06
Location: Saarbrücken, germany

GoDaddy Setup

Postby Eva » 26.04.2010, 10:51

The GoDaddy setup is this...

In System Admin
Status: On
Sender Email: whatever you wish
Sender name: whatever you wish
Method: PHP mail() --THIS IS THE KEY! SMTP WILL NOT WORK WITH GD
Server: smtpout.secureserver.net
SMTP username: youremail@godaddydomain.com
SMTP pass: your email passord

I tried with both Gmail (you need SSL and port 465)

(thank you for posting this, cjt)
Project Management the way you like it: Collaborative - Open Source - Free

facebook.com/Collabtive
twitter.com/Collabtive
xing.com/companies/collabtive
linkedin.com/company/collabtive
User avatar
Eva
 
Posts: 1471
Joined: 01.01.2008, 23:31
Location: Saarbrücken, Germany

Re: Unofficial FAQ (w/Answers)

Postby 219jondn » 05.05.2010, 16:18

anyone know what the specific setup is for 1and1?
I am hoping ti is what eva said regarding leaving it as php because my smtp doesn't seemt o be working :(
Jon Neubauer
CEO, SEO Research Center
Providing Cutting Edge SEO Solutions for your Business
219jondn
 
Posts: 9
Joined: 04.05.2010, 18:33

Re: Unofficial FAQ (w/Answers)

Postby kirbym9271 » 22.05.2012, 08:06

I am hoping I am doing this right. My web experience is about 5 years outdated. I've installed and set up a linux server with collabtive and have created and registered a domain name with godaddy. I will tell godaddy that I am doing my own webhosting on the linux server. I just want to be absolutely sure that since this is open source that I am not restricted to referencing collabtive in my domain name.

for example:

Would I be okay in using either name?

mywebsitename.net/collabtive
or
mywebsitename.net/projects

I'm sorry if this is a dumb question, like i said I'm kind of new at this right now.

thanks,
Matt
kirbym9271
 
Posts: 5
Joined: 22.05.2012, 07:58

Re: Unofficial FAQ (w/Answers)

Postby Eva » 22.05.2012, 15:29

Hi Matt,

sure, it does not matter how you name the URL / subdomain / subfolder for your Collabtive installation.
Project Management the way you like it: Collaborative - Open Source - Free

facebook.com/Collabtive
twitter.com/Collabtive
xing.com/companies/collabtive
linkedin.com/company/collabtive
User avatar
Eva
 
Posts: 1471
Joined: 01.01.2008, 23:31
Location: Saarbrücken, Germany

Re: Unofficial FAQ (w/Answers)

Postby wolff » 02.06.2013, 08:11

Hello,
was wondering if anyone has gotten this to work with outlook.com? smtp.live.com? Thanks!
wolff
 
Posts: 1
Joined: 02.06.2013, 08:09

Re: SMTP, Gmail, non-phpmail() LAMP stacks

Postby andy.swick » 10.07.2013, 23:48

Steiner wrote:Q: Does Collabtive support SMTP clients like gmail and other services requiring it to be secure and state ports?


Attached are my settings, what am I missing?

Any help would be great!

Andrea
Attachments
email-settings.png
Email Settings
email-settings.png (10.83 KiB) Viewed 48373 times
andy.swick
 
Posts: 4
Joined: 11.06.2013, 23:27

Next

Return to General

Who is online

Users browsing this forum: No registered users

cron