# Unable to send queue emails

**URL:** <https://forum.mautic.org/t/unable-to-send-queue-emails/21168>\
**Category:** Mautic 4 Install/Upgrade Support\
**Created:** [October 6, 2021, 12:09pm UTC](https://forum.mautic.org/t/unable-to-send-queue-emails/21168 "2021-10-06T12:09:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mindeswx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mindeswx/32/422_2.png) [@mindeswx](https://forum.mautic.org/u/mindeswx)\
**Post date:** [October 6, 2021, 12:09pm UTC](https://forum.mautic.org/t/unable-to-send-queue-emails/21168/1 "2021-10-06T12:09:20Z")

</div>

**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** -

```auto
[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…

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [October 6, 2021, 2:50pm UTC](https://forum.mautic.org/t/unable-to-send-queue-emails/21168/2 "2021-10-06T14:50:47Z")

</div>

> [@mindeswx](#):
>
> `"553 Envelope FROM 'hello@pinkcreators.com' email address not allowed. "`

> [@mindeswx](#):
>
> `"553 Envelope FROM 'tomajx@gmail.com' email address not allowed. "`

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

---

<div class="post-metadata">

**Author:** ![mindeswx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mindeswx/32/422_2.png) [@mindeswx](https://forum.mautic.org/u/mindeswx)\
**Post date:** [October 6, 2021, 3:00pm UTC](https://forum.mautic.org/t/unable-to-send-queue-emails/21168/3 "2021-10-06T15:00:31Z")

</div>

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

 ![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/8/81968771453d6107c3305e194d0d188b5e13402b.png)

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

 ![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/e/ea7a1ff63c862dbf8e01e795cdaeda56a2c665b3.png)  
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…

 ![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/c/cec9f2006e09d232c2ed8c25420d99d092c91fa6.png)  
I’m starting to lose my mind here, it has to be a bug on mautics side

---

<div class="post-metadata">

**Author:** ![mindeswx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mindeswx/32/422_2.png) [@mindeswx](https://forum.mautic.org/u/mindeswx)\
**Post date:** [October 10, 2021, 10:03am UTC](https://forum.mautic.org/t/unable-to-send-queue-emails/21168/4 "2021-10-10T10:03:39Z")

</div>

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

 ![configuration](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/6/65cd3733ec06b41c97b33927a8604c6ee3009a53.png)  
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…  
 ![email](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/8/850a7f5d6b6a8e259a61f5b4b2657194f1a80e96.png)

**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!
