Gmail works!

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
jomavaro
Posts: 2
Joined: 17 Apr 2010, 15:59

Gmail works!

Post by jomavaro »

Gmail works !

$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_username = 'myuser@mydomain.com';
$g_smtp_password = 'mypassword';
$g_smtp_connection_mode = 'tls';
$g_smtp_port = 25
acalvod
Posts: 7
Joined: 07 May 2010, 17:13

Re: Gmail works!

Post by acalvod »

Hello jomavaro,

I cannot make Mantis notifications work with gmail.
I just tried with your settings with my gmail account on config_inc without results.
Did you modify any other file? (PHP.ini, phpmailer,...)

Thanks a lot for your help!!
tetsunami
Posts: 26
Joined: 21 Apr 2010, 14:45

Re: Gmail works!

Post by tetsunami »

I tried this config and was ok

well you must set $g_enable_email_notification = ON;
by the way XD

see ya! :o
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Gmail works!

Post by atrol »

tetsunami wrote: well you must set $g_enable_email_notification = ON;
This is the deafult setting, you don't have to change anything for this
Please use Search before posting and read the Manual
mzainal
Posts: 8
Joined: 06 Aug 2010, 01:44

Re: Gmail works!

Post by mzainal »

Which file do i need to change this?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Gmail works!

Post by atrol »

mzainal wrote:Which file do i need to change this?
config_inc.php
Please use Search before posting and read the Manual
mzainal
Posts: 8
Joined: 06 Aug 2010, 01:44

Re: Gmail works!

Post by mzainal »

Got this error on error.log

Code: Select all

[Fri Aug  6 15:20:00 2010] [error] PHP Notice:  Use of undefined constant PHPMAILER_METHOD_SMTP - assumed 'PHPMAILER_METHOD_SMTP' in /htdocs/mantis-1.0.7/config_inc.php on line 42
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Gmail works!

Post by atrol »

mzainal wrote:in /htdocs/mantis-1.0.7/config_inc.php
Seems that this was not available in older versions of MantisBT
You should update to a newer version.

You could also try to use the value 2 instead of PHPMAILER_METHOD_SMTP
Please use Search before posting and read the Manual
prakash
Posts: 4
Joined: 10 Aug 2010, 04:02

Re: Gmail works!

Post by prakash »

goto : config_defaults_inc.php

Line : 483 (approx)

$g_phpMailer_method = PHPMAILER_METHOD_SMTP;

$g_smtp_host = 'smtp.gmail.com:465';

$g_smtp_username = 'username@gmail.com';

$g_smtp_password = 'yourpassword';

$g_smtp_connection_mode = 'ssl';

$g_smtp_port = 465;


These are the 100% working settings for gmail

Prakash
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Gmail works!

Post by atrol »

Thank you for posting this information.

But you should never change config_defaults_inc.php because this file will be overwritten when updating.
You have to add the lines that you want to change to file config_inc.php
Please use Search before posting and read the Manual
prakash
Posts: 4
Joined: 10 Aug 2010, 04:02

Re: Gmail works!

Post by prakash »

Edited : I'll try updating that file like you said

cheers.
Last edited by prakash on 10 Aug 2010, 10:36, edited 1 time in total.
prakash
Posts: 4
Joined: 10 Aug 2010, 04:02

Re: Gmail works!

Post by prakash »

@atrol. Sorry about my previous reply. I didn't read your post correctly. i forgot updating means upgrading to a new version.. anyways like you said ill try updating config_inc.php.

Thanks again
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Gmail works!

Post by atrol »

Yes, I meant updating to a newer version.
Even if you make a backup of config_defaults_inc.php before updating MantisBT you can get problems.
If a newer version of MantisBT introduces new configuration options in config_defaults_inc.php and you copy your backup over it, the new options are not set to an initial value.
This might lead to various issues.
Please use Search before posting and read the Manual
Post Reply