Email queue not sending

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Tim Jenkins
Posts: 2
Joined: 27 Nov 2017, 15:32

Email queue not sending

Post by Tim Jenkins »

Hi,

Up until today our installation seemed to be sending out emails successfully, then we stopped receiving emails from the system. Looking at '/admin/email_queue.php' I can see 70+ emails in the queue. If I click the 'Send or Delete' button on any of these individual emails then that email will be delivered fine. However the 'Send All' or 'Send or Delete All' buttons at the bottom of the page do not clear the queue or send any of the mail.

I have a Scheduled Task every 5 minutes running 'send_emails.php' using 'php.exe'. Upon trying to run this task manually I get the output:

Code: Select all

Sending emails...
Done.
However again this has not sent or cleared any of the email queue.

Any suggestions on how to get this email queue moving?

PHP v7.0
IIS 10
MantisBT Version: 2.5.1
config_inc.php :

Code: Select all

<?php
$g_hostname               = '_____';
$g_db_type                = 'mysqli';
$g_database_name          = '_____';
$g_db_username            = '_____';
$g_db_password            = '_____';

$g_default_timezone       = 'Europe/London';

$g_crypto_master_salt     = '_____';
$g_roadmap_view_threshold = OFF;
$g_changelog_view_threshold = OFF;
$g_enable_profiles = OFF;

$g_allow_signup    = ON;
$g_enable_email_notification = ON;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtp.office365.com';
$g_smtp_connection_mode= 'tls';
$g_SMTPAuth = true;
$g_smtp_port = 587;
$g_smtp_username = '_____';
$g_smtp_password = '_____';
$g_administrator_email = '_____'; 
$g_from_email      = '_____';
$g_return_path_email    = '_____';

$g_window_title = '_____';
$g_logo_image = 'images/360-SystemsCol.jpg';
$g_favicon_image = 'images/favicon.ico';
Tim Jenkins
Posts: 2
Joined: 27 Nov 2017, 15:32

Re: Email queue not sending

Post by Tim Jenkins »

Got this working in the end.

Turns out that an administrative account had the email address 'root@localhost'. Although running 'send_emails.php' didn't imply it emails to this address were failing to send. From the PHP errors log:

Code: Select all

2017-11-28 17:09 GMT MAIL email_api.php:1385 email_send() ERROR: Message could not be sent - SMTP Error: The following recipients failed: root@localhost: Recipient address reserved by RFC 2606
To resolve this I changed the email address on the account to something valid, then I had to manually remove all emails in the email queue to 'root@localhost' via mysql.
moe120
Posts: 1
Joined: 18 Feb 2021, 09:08

Re: Email queue not sending

Post by moe120 »

Thank you so much. I had the same problem. Mantis could not send any mails although the testmail script could.
In the error logs i found the same message, that it was attempting to send a mail to "root@localhost" but no user had this address, in no config file appeared this address so i was kind of lost. I did not expect mantis to collect all mails in a queue and this one poisoned mail could block all future mails from being send.

a

Code: Select all

delete from mantis_email_table where email like '%root@localhost%';
in sql did the trick. The next mail generating action triggered some hundred mails to be sent :-)

thanks again Tim!! My hero of the day
Helio
Posts: 1
Joined: 07 Apr 2022, 05:43

Re: Email queue not sending

Post by Helio »

Hi,
I also have the same problem, User can't receive the letter sent by Mantis, what is the final solution?
Post Reply