EMAIL NOT WORKING ANYMORE

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
mckintyre
Posts: 3
Joined: 11 Nov 2017, 07:01

EMAIL NOT WORKING ANYMORE

Post by mckintyre »

I got my email configuration working and has been able to receive notifications since then but now I can't seem to receive emails after December 4

I am using the same configuration and nothing has been changed but all of a sudden i cant send them now

here is my configuration
-------------------------------------------------------------------
$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:c:/TEMP/mantisbt.log';

$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_username = 'mantisxgears@gmail';
$g_smtp_password = '********';
$g_smtp_connection_mode = 'ssl';
$g_smtp_port = 465;
$g_webmaster_email = 'mantisxgears@gmail.com';
-------------------------------------------------------------------

MY LOG WAS FINE AND WAS LOGGING EVERYTHING, HERE IS MY LOG FILE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2017-12-05 12:01 PHT RECIPIENT email_api.php:264 email_collect_recipients() Issue = #1, add @U7 (explicitly specified)
2017-12-05 12:01 PHT RECIPIENT email_api.php:274 email_collect_recipients() Issue = #1, add @U13 (reporter)
2017-12-05 12:01 PHT RECIPIENT email_api.php:284 email_collect_recipients() Issue = #1, add @U13 (handler)
2017-12-05 12:01 PHT RECIPIENT email_api.php:338 email_collect_recipients() Issue = #1, add @U9 (note author)
2017-12-05 12:01 PHT RECIPIENT email_api.php:338 email_collect_recipients() Issue = #1, add @U8 (note author)
2017-12-05 12:01 PHT RECIPIENT email_api.php:338 email_collect_recipients() Issue = #1, add @U1 (note author)
2017-12-05 12:01 PHT RECIPIENT email_api.php:421 email_collect_recipients() Issue = #1, drop @U1 (own action)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

but now I get this errors on my log file

------------------------------------------------------------------------------------------------------------------------------------------------------
2017-12-05 16:40 +08 MAIL email_api.php:1389 email_send() ERROR: Message could not be sent - SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting
2017-12-05 16:43 +08 MAIL email_api.php:1389 email_send() ERROR: Message could not be sent - SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting
2017-12-05 16:44 +08 MAIL email_api.php:1389 email_send() ERROR: Message could not be sent - SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting
2017-12-05 17:40 +08 MAIL email_api.php:1389 email_send() ERROR: Message could not be sent - SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting
------------------------------------------------------------------------------------------------------------------------------------------------------

YES: I AM USING THE LATEST XAMPP
YES: I HAVE ALLOWED LESS SECURE APPS ON GOOGLE
YES: I HAVE UNCOMMENTED THE Openssl line on PHP.ini
NOTE: I WAS USING MANTIS 2.8 WHEN IT WAS WORKING AND RECEIVED THE ERRORS, NOW IM USING MANTIS 2.9 AND STILL RECEIVING THE ERRORS

can anyone help? seems like mantis developers aren't helping with the forums and email configurations.
The pinned email configurations thread still is hanging and has not been properly closed. some are still having trouble with email configurations up to the writing of this thread
pratikshah
Posts: 1
Joined: 28 Dec 2017, 10:21

Re: EMAIL NOT WORKING ANYMORE

Post by pratikshah »

Hope below fix will solve the issue.

In mantis-2.9.0 there is no configuration option available to set up PHPMailer variable SMTPOptions.

In case there is no value set up and use SMTP protocol to send email then system throw error.

FIX:
****
Filename: email_api.php
Method: email_send( EmailData $p_email_data )
Code Fix:
//Add below code before last try { ....} catch ( phpmailerException $e ) { ....} ...... return $t_success;
//Corrected issue of email sending
$t_mail->SMTPOptions = array('ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ));
dkman
Posts: 1
Joined: 28 Dec 2017, 22:01

Re: EMAIL NOT WORKING ANYMORE

Post by dkman »

@pratikshah
That worked for me.

To maybe help others locate the correct position, my file looks like this:

Code: Select all

	# *** custom
	$t_mail->SMTPOptions = array('ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ));
	# *** end custom
	
	try {
		$t_success = $t_mail->Send();
		#...
Post Reply