1

I have installed mantis and created users, but my email notification is not working. would you please help me out? i configured my config_inc.php file as followed.

<?php
$g_hostname               = 'localhost';
$g_db_type                = 'mysqli';
$g_database_name          = 'bugtracker';
$g_db_username            = 'root';
$g_db_password            = 'root';

$g_default_timezone       = 'Asia/Kolkata';

$g_crypto_master_salt     = 'HzYStp237n3sn+wmkWpQIM70+YyaiA4Y0c+jlapqZBE=';

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

 # --- Email Configuration ---
$g_phpMailer_method     = PHPMAILER_METHOD_MAIL; # or PHPMAILER_METHOD_SMTP,   PHPMAILER_METHOD_SENDMAIL
$g_smtp_host            = 'reseller8.hrwebservices.net';            # used   with PHPMAILER_METHOD_SMTP
$g_smtp_username        = 'heena@confluencesolution.com';                   #   used with PHPMAILER_METHOD_SMTP
$g_smtp_password        = 'heena@123';                  # used with PHPMAILER_METHOD_SMTP
$g_smtp_port            = '465';
$g_webmaster_email      = 'heena@confluencesolution.com';
$g_from_email           = 'heena@confluencesolution.com';   # the "From: "   field in emails
$g_return_path_email    = 'heena@confluencesolution.com';   # the return          address for bounced mail
# $g_from_name          = 'Mantis Bug Tracker';
# $g_email_receive_own  = OFF;
# $g_email_send_using_cronjob = OFF;


can anyone suggest me , how I make it working ?
Heena Patel
  • 105
  • 1
  • 4
  • 14
  • Have you tried using PHPMAILER_METHOD_MAIL? I would also recommend trying using Gmail or some public provider just to make sure that the problem is in MantisBT configuration, not the server configuration. – Teodor Talov Jan 11 '17 at 02:16
  • I tried with gmail but having the same issue. is my configuration is right or wrong ? – Heena Patel Jan 11 '17 at 05:57
  • I think I misspoke, have you tried using PHPMAILER_METHOD_SMTP instead of PHPMAILER_METHOD_MAIL? Your configuration looks OK, but it does seem that you should be using PHPMAILER_METHOD_SMTP. That should fix your problem. – Teodor Talov Jan 11 '17 at 15:18
  • Thank you, I will try the same, after I get finish my running job. – Heena Patel Jan 12 '17 at 09:28
  • I tried that "PHPMAILER_METHOD_SMTP" but still it is not working – Heena Patel Jan 30 '17 at 11:50

2 Answers2

3

Step 1

Update your mantisBT config_inc.php file as per below details.

<?php
$g_hostname               = 'localhost';
$g_db_type                = 'mysqli';
$g_database_name          = 'bugtracker';
$g_db_username            = 'root';
$g_db_password            = '';

$g_default_timezone       = 'Europe/Berlin';    
$g_crypto_master_salt     = 'k6icIz8yB2w5YRubgbiu1wFNp5YCl+SCnhPonQm5L7Q=';    
$g_allow_signup = ON; # allows the users to sign up for a new account    
$g_enable_email_notification = ON; # //enables the email messages    
$g_send_reset_password = ON;    
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;    
$g_smtp_host = 'smtp.gmail.com';    
$g_smtp_connection_mode = 'tls';    
$g_smtp_port = 587;    
$g_smtp_username = 'shivarajr2128@gmail.com'; //replace it with your gmail address    
$g_smtp_password = '********'; //replace it with your gmail password    
$g_administrator_email = 'administrator@gmail.com'; # //this will be your administrator email address    
$g_email_send_using_cronjob = OFF;    

Step2

Create User by following below steps.

Manage -> Manage Users -> Create New Account    
provide the details and click on Create User button

Step 3

Setup Email notification.

Manage -> Manage Configuration -> Email Notification.    
Check(Select Check box) message types depending on access level -> Click on Update Configuration button.
will-hart
  • 3,742
  • 2
  • 38
  • 48
Shivaraj R
  • 39
  • 2
0

To troubleshoot "PROBLEMS SENDING MAIL TO: Please check your php/mail server settings." on Amazon Linux 2 with 5.1 kernel with configured sendmail and using 'PHPMAILER_METHOD_SENDMAIL' I had to enable Mantis logging (should help with SMTP method too):

  1. Created a dir writable to my apache user
    mkdir /var/log/mantis
    chown apache /var/log/mantis
    chmod 770 /var/log/mantis

  2. Added two lines to log everything to config/config_inc.php:
    $g_log_destination = 'file:/var/log/mantis/mantis.log';
    $g_log_level = LOG_EMAIL_VERBOSE;

in my case there were two issues - mantis.log revealed that I need a valid e-mail address in $g_from_email, and then reviewing /var/log/maillog my SES didn't like my $g_return_path_email and was bouncing it because of wrong subdomain of $g_return_path_email.

kuz8
  • 369
  • 2
  • 10