Setting up Email Configuration

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
kimbebot
Posts: 6
Joined: 18 Jan 2012, 07:57

Setting up Email Configuration

Post 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!
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Setting up Email Configuration

Post by atrol »

Please use Search before posting and read the Manual
kimbebot
Posts: 6
Joined: 18 Jan 2012, 07:57

Re: Setting up Email Configuration

Post 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
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Setting up Email Configuration

Post by atrol »

Which versions of MantisBT, operating system, PHP do you use?
Please use Search before posting and read the Manual
kimbebot
Posts: 6
Joined: 18 Jan 2012, 07:57

Re: Setting up Email Configuration

Post by kimbebot »

I'm using PHP 5.2.1, WinXP, Mantis 1.2.8
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Setting up Email Configuration

Post 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.
Please use Search before posting and read the Manual
kimbebot
Posts: 6
Joined: 18 Jan 2012, 07:57

Re: Setting up Email Configuration

Post 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
cama
Posts: 5
Joined: 19 Feb 2013, 20:42

Re: Setting up Email Configuration

Post 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
cama
Posts: 5
Joined: 19 Feb 2013, 20:42

Re: Setting up Email Configuration

Post 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.
kimbebot
Posts: 6
Joined: 18 Jan 2012, 07:57

Re: Setting up Email Configuration

Post 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.
cama
Posts: 5
Joined: 19 Feb 2013, 20:42

Re: Setting up Email Configuration

Post by cama »

This fix for my problem was to not set the "g_smtp_connection_mode".
test.snsce
Posts: 1
Joined: 28 Feb 2013, 04:50

How to Setting up Email Configuration in Mantis Bug Tracker

Post 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
rysmith25
Posts: 1
Joined: 25 Jul 2016, 16:55

Re: Setting up Email Configuration

Post 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?
edward01
Posts: 1
Joined: 17 Aug 2016, 11:35

Re: Setting up Email Configuration

Post 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
  • Hello I Am Edward
Post Reply