Unable to send queue emails

Your software v4.0.1
My PHP version is : 7.4.3
My MariaDB is (delete as applicable): Ver 15.1 Distrib 10.3.31-MariaDB

Updating/Installing Errors
I am (delete as applicable): Installing
Upgrading/installing via (delete as applicable) : Web / Command Line

These errors are showing in the installer : PHP Warning: rename(): supplied resource is not a valid Stream-Context resource in /var/www/html/app/bundles/EmailBundle/Command/ProcessEmailQueueCommand.php on line 150

These errors are showing in the Mautic log :

Your problem
My problem is :
I am unable to queue emails, sending immediately works well (tested with sendgrid API and elasticmail SMTP)

This is the error I see in the dashboard log -

[2021-10-06 11:42:51] mautic.ERROR: [MAIL ERROR] Expected response code 250 but got code "553", with message "553 Envelope FROM 'hello@pinkcreators.com' email address not allowed. " (send); tomajx@gmail.com {"exception":"[object] (Swift_TransportException(code: 553): Expected response code 250 but got code \"553\", with message \"553 Envelope FROM 'hello@pinkcreators.com' email address not allowed.\r\n\" at /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:459)"} []
[2021-10-06 11:54:02] mautic.NOTICE: Swift_TransportException: Expected response code 250 but got code "553", with message "553 Envelope FROM 'tomajx@gmail.com' email address not allowed. " (uncaught exception) at /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php line 459 while running console command `mautic:emails:send` [] []
[2021-10-06 11:54:02] mautic.WARNING: Command `mautic:emails:send` exited with status code 255 [] []

and this is on the server logs -
PHP Warning: rename(): supplied resource is not a valid Stream-Context resource in /var/www/html/app/bundles/EmailBundle/Command/ProcessEmailQueueCommand.php on line 150

Steps I have tried to fix the problem :
This is a fresh install, I have tried triggering the cron jobs manually, but they are still not being sent out. However, no the dashboard it says the mails are sent succesflully. I have already spent a week trying to figure is out so ANY help is VERY MUCH appreciated, I believe this is some sort of a bug…

Seems like a setup issue with your mail provider. Are those addresses added to your authorized senders?

1 Like

Thank you for answering, my sending domain is - pinkcreators.com , and yes it is verified ( messages are delivered when NOT using a queue but sending immediately instead)

tomajx@gmail.com - is the customers email, maybe mautic is trying to use it as “from” for some reason?


In this screenshot you can see that I am able to send a custom message(not using the queue), and it is delivered, but when sending from the campaing using queue fails.

And this is the test email being sent from mautics dashboard, it’s going through…


I’m starting to lose my mind here, it has to be a bug on mautics side

Okay, I have finally figured it out by using such settings -
In “Configuration”>Email Settings


And advanced Email tab, you can set the “From address” there, and you MUST disable “Use owner as mailer” which does make sense when you read the description…

However I still think this is a bug, because on the dasboard it says email was sent succesfully, even though it was actually failing, I have only noticed it because I was sending to my own email to test it, so just make sure to always double check everything and send out test emails… Thanks for help!

1 Like