mantis 1.2.0 and gmail

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
finrod
Posts: 2
Joined: 15 Mar 2010, 14:05

mantis 1.2.0 and gmail

Post by finrod »

Hi all.

I know that this subject it's very common in mantis users, can you please help me?..

I want to set up a mantis configuration for send mail whit gmail.

I'm search how to do it, but I can't make it.

If you can please tell me some kind of "how - to" or just a few steps....

I'm desperated

Thanks all.
workprobe
Posts: 3
Joined: 16 Mar 2010, 13:50

Re: mantis 1.2.0 and gmail

Post by workprobe »

I need this information too. Thanks!
lloprete
Posts: 2
Joined: 17 Mar 2010, 18:17

Re: mantis 1.2.0 and gmail

Post by lloprete »

Ok,

First of all, it would be nice if you could describe your own experience. eg.:what's the mail notification method chosen, what were the step-by-steps that you already tried, etc..

In my experience, i tried a lot of changes in config_inc.php, but what really solve my issue was updating php_mailer version. (download)

After that I just had to set back port and host paramaters separated. I say this because I had tried to use the host configuration with port (g_smtp_host='host:465')

Here's my config_inc mail config:

Code: Select all

	$g_phpMailer_method		= PHPMAILER_METHOD_SMTP;
	$g_smtp_host			= 'smtp.gmail.com';
	$g_smtp_port 			= 465;
	$g_smtp_username 		= 'user@owndomain.com';
	$g_smtp_password 		= '*****';
	$g_smtp_connection_mode		= 'ssl';
I have my domain using Google Apps, so that's why i'm using my owndomain.com in username. I haven't tested GMail account config, but i guess this should work as well. Another thing that i didn't test was using port 587 with TLS.

I hope it work for you too.
If you have any questions on how to upgrade PHP Mailer, just tell me.

Regards,
Lucas
lloprete
Posts: 2
Joined: 17 Mar 2010, 18:17

Re: mantis 1.2.0 and gmail

Post by lloprete »

Maybe this could also help you.
I used following script to test sending emails via PHPMailer.

Code: Select all

<?php
ini_set("include_path",".:/complete/path/to/your/mantis/core/phpmailer/");

require("class.phpmailer.php");

$mail = new PHPMailer();


$mail->IsSMTP();
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
$mail->Port = 465; // set the SMTP port
$mail->Username = "user@owndomain.com"; // GMAIL username
$mail->Password = "passwd";

$mail->From = "user@owndomain.com";
$mail->FromName = "Email Test";
$mail->AddAddress("to@owndomain.com");


$mail->Subject = "PHPMailer Test Message";
$mail->Body = "Hi! \n\n This is a test e-mail sent through PHPMailer.";
$mail->WordWrap = 50;

if(!$mail->Send()) {
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent.';
}
?>
:wink:
eli
Posts: 1
Joined: 12 Apr 2010, 08:38

Re: mantis 1.2.0 and gmail

Post by eli »

hello,

I tried your configuration, but mine still doesn't work. i'm also using google apps. how did you upgrade your php_mailer version? do you just copy and paste?

Thanks!

Regards,
Elijah
Post Reply