Page 1 of 1

Setting up Email Configuration

Posted: 20 Feb 2012, 04:41
by kimbebot
Hello people, I am new here in Mantis. I have this problem that my Mantis was not able to send my email notification. I started creating a new reporter account and I got this message:

Congratulations. You have registered successfully. You are now being sent a confirmation e-mail to verify your e-mail address. Visiting the link sent to you in this e-mail will activate your account.

But there's no email on my inbox coming from MAntis. I read some posts regarding this, they say that to enable the email notification we need to setup first config_inc.php.
This is the initial code after my successful installation.
config_inc.php

Code: Select all

<?php
	# --- Database Configuration ---
	$g_hostname      = 'localhost';
	$g_db_username   = '<myUserName>';
	$g_db_password   = '<myPassword>';
	$g_database_name = 'bugtracker';
	$g_db_type       = 'mysql';
?>
In my Mantis directory i found this one and I configure it myself.

config_inc.php.sample -> There was a note saying that rename this to config_inc.php so I did and overwrite the previous config_inc.php

Code: Select all

<?php
	# --- Database Configuration ---
	$g_hostname      = 'localhost';
	$g_db_username   = '<myUser>';
	$g_db_password   = '<myPass>';
	$g_database_name = 'bugtracker';
	$g_db_type       = 'mysql';

	# --- Anonymous Access / Signup ---
	$g_allow_signup				= ON;
	$g_allow_anonymous_login	= OFF;
	$g_anonymous_account		= '';

	# --- Email Configuration ---
	$g_phpMailer_method		= PHPMAILER_METHOD_SMTP; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
	$g_smtp_host			= 'smtp.gmail.com';			# used with PHPMAILER_METHOD_SMTP
	$g_smtp_username		= '<myUser@gmail.com>';					# used with PHPMAILER_METHOD_SMTP
	$g_smtp_password		= '<myPass>';					# used with PHPMAILER_METHOD_SMTP
	$g_administrator_email  = '<myUser@gmail.com>';
	$g_webmaster_email      = '<myUser@gmail.com>';
	$g_from_name			= 'Mantis Bug Tracker';
	$g_from_email           = '<myUser@gmail.com>';	# the "From: " field in emails
	$g_return_path_email    = '<myUser@gmail.com>';	# the return address for bounced mail
	$g_email_receive_own	= OFF;
	$g_email_send_using_cronjob = OFF;

	# --- Attachments / File Uploads ---
	$g_allow_file_upload	= ON;
	$g_file_upload_method	= DATABASE; # or DISK
	$g_absolute_path_default_upload_folder = ''; # used with DISK, must contain trailing \ or /.
	$g_max_file_size		= 5000000;	# in bytes
	$g_preview_attachments_inline_max_size = 256 * 1024;
	$g_allowed_files		= '';		# extensions comma separated, e.g. 'php,html,java,exe,pl'
	$g_disallowed_files		= '';		# extensions comma separated

	# --- Branding ---
	$g_window_title			= 'MantisBT';
	$g_logo_image			= 'images/mantis_logo.gif';
	$g_favicon_image		= 'images/favicon.ico';

	# --- Real names ---
	$g_show_realname = OFF;
	$g_show_user_realname_threshold = NOBODY;	# Set to access level (e.g. VIEWER, REPORTER, DEVELOPER, MANAGER, etc)

	# --- Others ---
	$g_default_home_page = 'my_view_page.php';	# Set to name of page to go to after login
?>
After configuring this file, I signed up a new user again and got this message:
Fatal error: Call to undefined method SMTP::getError() in ..\mantis\library\phpmailer\class.phpmailer.php on line 1910

Please help me with this error, do I miss something? Or do I need to modify some of the related files here?
Please help! :cry:

Thanks!

Re: Setting up Email Configuration

Posted: 20 Feb 2012, 07:39
by atrol

Re: Setting up Email Configuration

Posted: 20 Feb 2012, 08:24
by kimbebot
I tried to follow that post and I got this error:
Fatal error: Call to undefined method SMTP::StartTLS() in ..\mantis\library\phpmailer\class.phpmailer.php on line 803

Re: Setting up Email Configuration

Posted: 20 Feb 2012, 09:33
by atrol
Which versions of MantisBT, operating system, PHP do you use?

Re: Setting up Email Configuration

Posted: 21 Feb 2012, 02:38
by kimbebot
I'm using PHP 5.2.1, WinXP, Mantis 1.2.8

Re: Setting up Email Configuration

Posted: 21 Feb 2012, 08:01
by atrol
kimbebot wrote:PHP 5.2.1
As a first step I recommend to update PHP. At least to 5.2.5 or 5.3.3. There are various known bugs when running MantisBT with older versions.

Re: Setting up Email Configuration

Posted: 22 Feb 2012, 07:54
by kimbebot
I think my local computer has the problem. Before, I put Mantis in our website (with mail service) and did the same thing and got the same error. And now, again I did the same thing but this time it works. Don't know why is it like that, but then thanks for your help! :P

Re: Setting up Email Configuration

Posted: 20 Feb 2013, 21:58
by cama
I am getting the same error but at a different line number:
Fatal error: Call to undefined method SMTP::StartTLS() in /xxx/xxx/xxx/xxx/xxx/bugtracker/library/phpmailer/class.phpmailer.php on line 895

I first tested this on my local MAMP server using a gmail account. No problem.

I then loaded it to my website using the same gmail account and received the error. (I have removed the directory structure for privacy reasons.)

I am using PHP 5.3.13, Mantis 1.2.14dev, Linux

Re: Setting up Email Configuration

Posted: 20 Feb 2013, 22:30
by cama
Update to my last post. I downloaded and tried the lastest version of Mantis and I am having the same problem with MantisBT 1.2.14.

Re: Setting up Email Configuration

Posted: 22 Feb 2013, 02:31
by kimbebot
Hi, it's been a while since I setup my Mantis. I am not using it anymore, but I have a similar question asked in Stackoverflow and its http://stackoverflow.com/questions/9356 ... sing-gmail. The reason was not clear to me though but it works using the settings I provided on that question. Hope it helps you.

Re: Setting up Email Configuration

Posted: 25 Feb 2013, 22:04
by cama
This fix for my problem was to not set the "g_smtp_connection_mode".

How to Setting up Email Configuration in Mantis Bug Tracker

Posted: 28 Feb 2013, 05:10
by test.snsce
Hi Friends,
i installed Mantis Bus Tracker. if i am creating new user account means, email not sent to particular users email address. how to enable email sending option in mantis bug tracker. pl help me. my mail id : test.snsce@gmail.com

with regards

Nagarajan S

Re: Setting up Email Configuration

Posted: 25 Jul 2016, 16:58
by rysmith25
cama wrote:This fix for my problem was to not set the "g_smtp_connection_mode".
You are a god send. Thank you so much. I still have no idea why there is a config_default_inc in root folder, and a config_inc.php.sample in the config folder, any thoughts?

Re: Setting up Email Configuration

Posted: 17 Aug 2016, 11:43
by edward01
I tried to follow that post and I got this error:
Fatal error: Call to undefined method SMTP::StartTLS() in ..\mantis\library\phpmailer\class.phpmailer.php on line 803