Mantis failed to send emails in 1.2 while working in 1.1.2

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
matthewhuang
Posts: 6
Joined: 26 Feb 2010, 19:17

Mantis failed to send emails in 1.2 while working in 1.1.2

Post by matthewhuang »

Hi, we recently upgraded from version 1.1.2 to 1.2 release version. Other parts look fine but we fail to send out email. I tried the Test email part from the admin page but always received.

Testing Mail - PROBLEMS SENDING MAIL TO: ****@****.com. Please check your php/mail server settings.

However our smtp email configuration works just fine in the old version 1.1.2. the email configuration portion in the config_inc.php file is listed as below:

$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'our smtp mail host name';
$g_smtp_username = 'our smtp username;
$g_smtp_password = 'our smtp password';
$g_administrator_email = '****@****.com';
$g_webmaster_email = '****@****.com';
$g_from_email = '****@****.com';
matthewhuang
Posts: 6
Joined: 26 Feb 2010, 19:17

Re: Mantis failed to send emails in 1.2 while working in 1.1.2

Post by matthewhuang »

Also

$g_smtp_connection_mode = '';
$g_smtp_port = 25;

What else do I need to set in 1.2?

Thanks,
Kirill
Posts: 640
Joined: 25 Nov 2007, 08:05
Location: Kaliningrad, RF
Contact:

Re: Mantis failed to send emails in 1.2 while working in 1.1.2

Post by Kirill »

Edit config_inc.php

Code: Select all

	$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
//   e.g. (Linux), $g_log_destination = 'file:/tmp/mantisbt.log';
//   e.g. (Windows), $g_log_destination = 'file:c:/temp/mantisbt.log';
	$g_log_destination = 'file:/tmp/mantisbt.log';
After send mail look log-file.
andreasfc
Posts: 29
Joined: 05 Nov 2007, 10:41

Re: Mantis failed to send emails in 1.2 while working in 1.1.2

Post by andreasfc »

I have the same problem when using SMTP mail
Kirill
Posts: 640
Joined: 25 Nov 2007, 08:05
Location: Kaliningrad, RF
Contact:

Re: Mantis failed to send emails in 1.2 while working in 1.1.2

Post by Kirill »

What text in log-file?
andreasfc
Posts: 29
Joined: 05 Nov 2007, 10:41

Re: Mantis failed to send emails in 1.2 while working in 1.1.2

Post by andreasfc »

I figured it out, my mistake; wrong config on the smtp mailer.
matthewhuang
Posts: 6
Joined: 26 Feb 2010, 19:17

Re: Mantis failed to send emails in 1.2 while working in 1.1.2

Post by matthewhuang »

I tried putting the log file there as well. But nothing showed up in the log After I tested the email sending.
matthewhuang
Posts: 6
Joined: 26 Feb 2010, 19:17

Re: Mantis failed to send emails in 1.2 while working in 1.1.2

Post by matthewhuang »

I created a new issue and assigned that issue to myself and received the below log for it.

2010-03-01 16:05 CST mail Issue = #715, Type = owner, Msg = 'email_notification_title_for_action_bug_assigned', User = @U10, Email = 'MatthewHuang@*******.com'.

No exception, but I didn't receive any emails just like what happened when I use the admin page to test email functionality.

Can you help me?
Kirill
Posts: 640
Joined: 25 Nov 2007, 08:05
Location: Kaliningrad, RF
Contact:

Re: Mantis failed to send emails in 1.2 while working in 1.1.2

Post by Kirill »

This notice talk about actions assign issue for user 10 with this email.
Try assign to other if you set

Code: Select all

	$g_email_receive_own	= OFF;
cjard
Posts: 3
Joined: 02 Mar 2010, 11:40

Re: Mantis failed to send emails in 1.2 while working in 1.1.2

Post by cjard »

When I had problems with this, I edited email_api.php:

Code: Select all

//in email_send() function:

	catch ( phpmailerException $e )
	{
[b]		$t_success = $e->errorMessage();[/b]
	}
And then in test_email.php:

Code: Select all

$result = email_send( $t_email_data );

			# $result = email_send( config_get_global( 'administrator_email' ), 'Testing PHP mail() function',	'Your PHP mail settings appear to be correctly set.');

[b]      echo ' email_send() result is: ' . $result;[/b]
			

			if( $result ) {
So i could see the error message.

Remember to set stuff back after.. or maybe the mantis team can create an overload of email_send that reports more verbose info to test_email than jsut "success" or "fail" -> in my case the message came back "Authentication failure" which led me to track the problem down to a password typo :)
Kirill
Posts: 640
Joined: 25 Nov 2007, 08:05
Location: Kaliningrad, RF
Contact:

Re: Mantis failed to send emails in 1.2 while working in 1.1.2

Post by Kirill »

Can you test check on last master-branch?
matthewhuang
Posts: 6
Joined: 26 Feb 2010, 19:17

Re: Mantis failed to send emails in 1.2 while working in 1.1.2

Post by matthewhuang »

I tried cjard's suggestion and now I received:

Testing Mail - email_send() result is: SMTP Error: Could not authenticate.

I noticed that the phpmailer comes with Mantis 1.2 is version 5.1 whereas my older Mantis 1.1.2 uses phpmailer 1.73.

I checked my smtp configuration and they are identical in Mantis 1.2 and Mantis 1.1.2?

Why am I getting the SMTP Error: Could not authenticate error in 1.2 while I am able to send email in 1.1.2?

Thanks,
Kirill
Posts: 640
Joined: 25 Nov 2007, 08:05
Location: Kaliningrad, RF
Contact:

Re: Mantis failed to send emails in 1.2 while working in 1.1.2

Post by Kirill »

Can you test with other email-accaunt? May be other server?
ecoimp0211
Posts: 2
Joined: 01 Mar 2011, 08:18

Re: Mantis failed to send emails in 1.2 while working in 1.1

Post by ecoimp0211 »

Assuming you have edited the configuration file to avoid revealing their data, the only way to know why cant send all mails is to check the server logs.There you can see if localhost is not even connected, is connected but not sending or whatever.
Post Reply