Setting up Email Configuration

General discussion of Mantis.

Moderators: Developer, Contributor

Setting up Email Configuration

Postby kimbebot » Feb 19, 2012 11:41 pm

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!
kimbebot
 
Posts: 6
Joined: Jan 18, 2012 2:57 am

Re: Setting up Email Configuration

Postby atrol » Feb 20, 2012 2:39 am

Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 4703
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Setting up Email Configuration

Postby kimbebot » Feb 20, 2012 3:24 am

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
kimbebot
 
Posts: 6
Joined: Jan 18, 2012 2:57 am

Re: Setting up Email Configuration

Postby atrol » Feb 20, 2012 4:33 am

Which versions of MantisBT, operating system, PHP do you use?
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 4703
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Setting up Email Configuration

Postby kimbebot » Feb 20, 2012 9:38 pm

I'm using PHP 5.2.1, WinXP, Mantis 1.2.8
kimbebot
 
Posts: 6
Joined: Jan 18, 2012 2:57 am

Re: Setting up Email Configuration

Postby atrol » Feb 21, 2012 3:01 am

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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 4703
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Setting up Email Configuration

Postby kimbebot » Feb 22, 2012 2:54 am

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
kimbebot
 
Posts: 6
Joined: Jan 18, 2012 2:57 am

Re: Setting up Email Configuration

Postby cama » Feb 20, 2013 4:58 pm

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: Feb 19, 2013 3:42 pm

Re: Setting up Email Configuration

Postby cama » Feb 20, 2013 5:30 pm

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

Re: Setting up Email Configuration

Postby kimbebot » Feb 21, 2013 9:31 pm

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/9356904/configuring-mantisbt-to-send-emails-using-gmail. The reason was not clear to me though but it works using the settings I provided on that question. Hope it helps you.
kimbebot
 
Posts: 6
Joined: Jan 18, 2012 2:57 am

Re: Setting up Email Configuration

Postby cama » Feb 25, 2013 5:04 pm

This fix for my problem was to not set the "g_smtp_connection_mode".
cama
 
Posts: 5
Joined: Feb 19, 2013 3:42 pm

How to Setting up Email Configuration in Mantis Bug Tracker

Postby test.snsce » Feb 28, 2013 12:10 am

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
test.snsce
 
Posts: 1
Joined: Feb 27, 2013 11:50 pm


Return to General Discussion

Who is online

Users browsing this forum: Bing [Bot] and 7 guests

cron