View Issue Details

IDProjectCategoryView StatusLast Update
0020571mantisbtemailpublic2017-03-22 03:53
ReporterDLeon Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version1.3.0-rc.1 
Summary0020571: After upgrade emails are not sent anymore
Description

We updated our Mantis from Version 1.2.15 to 1.3.0-rc.1

After the upgrade sending emails fails. It makes no difference if we use the cronjob or not. The old version 1.2.15 and the new version 1.3.0-rc.1 are running on the same server. For the old version emails are sent, but not for the new version.

We use a SMTP server depending on Microsoft Exchange. The communication between the webserver and the mailserver stops when the mail server sends his certificate. That's interessting, because we configured the system using no encryption. We want to use the standard port 25 and the standard SMTP connection mode.

If we disable the TLS support on the SMTP server, the emails are sent, but that is not an option.

Steps To Reproduce

###System:
Window 2008 R2 SP1
Webserver IIS 7.5
DB MYSQL 5.1
PHP 5.6.16

--- Email Configuration ---

$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'mail.company.com';
$g_smtp_username = '';
$g_smtp_password = '';
$g_webmaster_email = 'webmaster@company.com';
$g_from_name = Mantis Bug Tracker';
$g_from_email = 'noreply@company.com';
$g_return_path_email = 'mantisbt@company.com';
$g_email_receive_own = OFF;

TagsNo tags attached.

Activities

atrol

atrol

2016-02-05 08:33

developer   ~0052468

Check your settings for $g_smtp_connection_mode and $g_smtp_port

I didn't check, maybe there is a difference between 1.2.x and 1.3.x how different settings are treated

$g_smtp_connection_mode = '';
$g_smtp_connection_mode = 'tls';
$g_smtp_connection_mode = 'ssl';

DLeon

DLeon

2016-02-05 08:55

reporter   ~0052469

I tried

$g_smtp_port = 25;
$g_smtp_connection_mode = '';

and I tried the default options (which means $g_smtp_port and $g_smtp_connection_mode are not mentioned in the config file).

Both versions work in my version 1.2.15 on the same server. And that's what I want to use again in the new version.

By the way $g_smtp_connection_mode = 'tls'; and $g_smtp_connection_mode = 'ssl'; didn't work either.

It seems the mantis is ignoring my default settings.

atrol

atrol

2016-02-05 09:24

developer   ~0052470

Worth a try:

$g_smtp_port = 587;
$g_smtp_connection_mode = 'tls';

DLeon

DLeon

2016-02-05 09:32

reporter   ~0052471

Didn't work either.

dregad

dregad

2016-02-27 09:56

developer   ~0052590

Mail server issues are always specific to local configuration and always difficult to troubleshoot. Even more so when one does not have access to the same infrastructure...

Comparing the code, AFAICT email_send() API function has not changed significantly since 1.2.x, but we did upgrade the PHPMailer library, so maybe that's caused by that.

To give us more information about the error, could you kindly set your configuration as follows:

$g_log_level = LOG_EMAIL;
$g_log_destination = 'file:/path/to/mantis.log';

Then reproduce the error and post the relevant contents of the log file here.

DLeon

DLeon

2016-02-29 05:27

reporter   ~0052601

The logfile just contains:

29-02-2016 11:19 CET MAIL ERROR: Message could not be sent - SMTP Fehler: Could not connect to SMTP host.

But if I use the test function on email_queue.php the log is a little bit more detailed:

Testing Mail - 2016-02-29 10:17:52 CLIENT -> SERVER: EHLO mantis.company.com 2016-02-29 10:17:52 CLIENT -> SERVER: STARTTLS 2016-02-29 10:19:39 SMTP Error: Could not connect to SMTP host. 2016-02-29 10:19:39 CLIENT -> SERVER: QUIT 2016-02-29 10:19:39 SMTP ERROR: QUIT command failed: 2016-02-29 10:19:39 SMTP Error: Could not connect to SMTP host. PROBLEMS SENDING MAIL TO: webmaster@mantis.company.com. Please check your php/mail server settings.

This test was executed with the needed settings:
$g_smtp_port = 25;
$g_smtp_connection_mode = '';

ringlord

ringlord

2017-03-10 04:19

reporter   ~0056031

We have Mantis 2.2.0 installed and also mail was not working anymore (since some time)
I had to add this line to config_inc.php :
$g_return_path_email = 'valid.user@company.com'; # the return address for bounced mail

AND it seems that this address is used as FROM: address (and in my company the from needs to be a valid email address in the company)

dregad

dregad

2017-03-10 04:56

developer   ~0056032

This is not a bug or feature request for MantisBT (the problem is caused by system configuration). I am therefore resolving this issue as "no change required".

Please use the forums, the mantisbt-help mailing list or IRC to get support on customizing and using MantisBT (see http://www.mantisbt.org/support.php)