# Mautic Stops sending emails when configuration is set to Queue Emails

**URL:** https://forum.mautic.org/t/mautic-stops-sending-emails-when-configuration-is-set-to-queue-emails/20234
**Category:** Product Support
**Created:** [July 22, 2021, 8:44am UTC](https://forum.mautic.org/t/mautic-stops-sending-emails-when-configuration-is-set-to-queue-emails/20234 "2021-07-22T08:44:36Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![abdallahtaleb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/abdallahtaleb/32/1351_2.png) [@abdallahtaleb](https://forum.mautic.org/u/abdallahtaleb)
#### Post date: [July 22, 2021, 8:44am UTC](https://forum.mautic.org/t/mautic-stops-sending-emails-when-configuration-is-set-to-queue-emails/20234/1 "2021-07-22T08:44:36Z")

</div>

**Your software**  
My Mautic version is: 4.0  
My PHP version is: 7.4.18  
My Database type and version is: MariaDB

**Your problem**  
My problem is: Whenever the emails are set to queue emails, the server stops sending any email. It gives the Uh Oh I think I broke message and no emails are sent.

These errors are showing in the log:  
mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Argument 1 passed to Swift\_Mailer::\_\_construct() must implement interface Swift\_Transport, bool given, called in /var/www/html/mautic/app/bundles/EmailBundle/Helper/MailHelper.php on line 308” at /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php line 24 {“exception”:"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Argument 1 passed to Swift\_Mailer::\_\_construct() must implement interface Swift\_Transport, bool given, called in /var/www/html/mautic/app/bundles/EmailBundle/Helper/MailHelper.php on line 308 at /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php:24)"}

Steps I have tried to fix the problem:  
I tried to change in the cronjobs, but was not successful.

---

<div class="post-metadata">

### Author: ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)
#### Post date: [July 22, 2021, 9:44am UTC](https://forum.mautic.org/t/mautic-stops-sending-emails-when-configuration-is-set-to-queue-emails/20234/2 "2021-07-22T09:44:28Z")

</div>

Hi

A few things to check here:

1. Check your permissions on the mautic directory and who the owner is (should all be www-data)
2. Check your system log file inside Mautic
3. Check your mautic.error file in /var/log/\<nginx/apache2\>/mautic.error
4. Provide as much feedback here as possible (including your cronjob

---

<div class="post-metadata">

### Author: ![abdallahtaleb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/abdallahtaleb/32/1351_2.png) [@abdallahtaleb](https://forum.mautic.org/u/abdallahtaleb)
#### Post date: [July 22, 2021, 12:07pm UTC](https://forum.mautic.org/t/mautic-stops-sending-emails-when-configuration-is-set-to-queue-emails/20234/3 "2021-07-22T12:07:19Z")

</div>

1- Permissions are good and owner is www-data on all.  
2- Logs show this: [2021-07-22 12:00:04] mautic.NOTICE: Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The “swiftmailer.transport.real” service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead. (uncaught exception) at /var/www/html/mautic/vendor/symfony/dependency-injection/Container.php line 275 while running console command `mautic:emails:send`    
[2021-07-22 12:00:04] mautic.WARNING: Command `mautic:emails:send` exited with status code 1    
3- There is no such file mautic.error in apache2.  
4- I have used below cronjobs:  
#Segments Every 2 Minutes  
\*/2 \* \* \* \* root /usr/bin/php /var/www/html/mautic/bin/console mautic:segments:update

\*/3 \* \* \* \* root /usr/bin/php /var/www/html/mautic/bin/console mautic:import

#Campaigns (Every 1 Minute)

- 
  - 
    - 
      - 
        - root /usr/bin/php /var/www/html/mautic/bin/console mautic:campaigns:update

- 
  - 
    - 
      - 
        - root /usr/bin/php /var/www/html/mautic/bin/console mautic:campaigns:trigger

- 
  - 
    - 
      - 
        - root /usr/bin/php /var/www/html/mautic/bin/console mautic:messages:send

#Process Email Queue Every 5 Minutes  
\*/5 \* \* \* \* root /usr/bin/php /var/www/html/mautic/bin/console mautic:emails:send

\*/5 \* \* \* \* root /usr/bin/php /var/www/html/mautic/bin/console mautic:email:send

\*/5 \* \* \* \* root /usr/bin/php /var/www/html/mautic/bin/console mautic:broadcasts:send

#Fetch and Process Monitored Email Every 10 Minutes  
\*/10 \* \* \* \* root /usr/bin/php /var/www/html/mautic/bin/console mautic:email:fetch

Thank you for the support.

---

<div class="post-metadata">

### Author: ![abdallahtaleb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/abdallahtaleb/32/1351_2.png) [@abdallahtaleb](https://forum.mautic.org/u/abdallahtaleb)
#### Post date: [August 2, 2021, 8:50am UTC](https://forum.mautic.org/t/mautic-stops-sending-emails-when-configuration-is-set-to-queue-emails/20234/4 "2021-08-02T08:50:40Z")

</div>

Any help here is much appreciated.

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [August 2, 2021, 9:19am UTC](https://forum.mautic.org/t/mautic-stops-sending-emails-when-configuration-is-set-to-queue-emails/20234/5 "2021-08-02T09:19:09Z")

</div>

Hi,  
yes, as the log said the command, that sends the email is exiting with an error.  
“The “swiftmailer.transport.real” service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.”

---

<div class="post-metadata">

### Author: ![condoexchange](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/condoexchange/32/682_2.png) [@condoexchange](https://forum.mautic.org/u/condoexchange)
#### Post date: [October 30, 2021, 3:52pm UTC](https://forum.mautic.org/t/mautic-stops-sending-emails-when-configuration-is-set-to-queue-emails/20234/6 "2021-10-30T15:52:31Z")

</div>

Mautic v. 4.01

I have a database of around 600k and using SES to send via smtp. All cron jobs are set as required and the system shows all emails have been sent and no errors shown on the frontend. But when I check SES dashboard, I see only 50% of the emails have been sent and the number is stuck there from the last 1 day. (I have great email limit with SES and are not capped yet)

When I check files on Mautic backend via FTP, following are the observations:

1. Spool folder is empty but yet the size is 16mb
2. Checked these 2 log files - hope Mautic can check and let me know what’s going wrong.

File: mautic\_prod-2021-10-30.php

[2021-10-30 00:00:16] mautic.ERROR: Invalid clickthrough value: Yjo4OntmOjk6ImZiaGVkZiI7Yjo1Ont2OjM7Zjo4OiJmemJ2eSI7djo0O3Y6NTt9Zjo4OiJmemJ2eSI7djo1O2Y6NzoiZmdiZyI7Zjo1NToiOTQwYmE1ZjMzZmUyZTk2Njg1NzY1NyI7Zjo3OiJ5ZmJlIjtmOjk6IjU2MTg0MSI7ZjowOiJkdWJhYWZ5IjtiOjQ6e2Y6ODoiZnpidnkiO3Y6NTt9fQ== {“exception”:"[object] (Mautic\CoreBundle\Exception\InvalidDecodedStringException(code: 0): The string b:8:{f:9:“fbhedf”;b:5:{v:3;f:8:“fzbvy”;v:4;v:5;}f:8:“fzbvy”;v:5;f:7:“fgbg”;f:55:“940ba5f33fe2e966857657”;f:7:“yfbe”;f:9:“561841”;f:0:“dubaafy”;b:4:{f:8:“fzbvy”;v:5;}} is not a serialized array at /home/private/public\_html/privatedomain.org/mautic/app/bundles/CoreBundle/Helper/ClickthroughHelper.php:46)"}

File: prod-2021-10-30.php

[2021-10-30 01:31:22] console.CRITICAL: Error thrown while running command “mautic:emails:send”. Message: “Expected response code 250 but got code “554”, with message “554 Transaction failed: Address length is more than 320 bytes long: ‘=?utf-8?Q?Genevi=C3=83=C6=92=C3=86=E2=80=99=C3=83=E2=80=A0?= =?utf-8?Q?=C3=A2=E2=82=AC=E2=84=A2=C3=83=C6=92=C3=A2=E2=82=AC=C2=A0?= =?utf-8?Q?=C3=83=C2=A2=C3=A2=E2=80=9A=C2=AC=C3=A2=E2=80=9E=C2=A2?= =?utf-8?Q?=C3=83=C6=92=C3=86=E2=80=99=C3=83=C2=A2=C3=A2=E2=80=9A?= =?utf-8?Q?=C2=AC=C3=85=C2=A1=C3=83=C6=92=C3=A2=E2=82=AC=C5=A1?= =?utf-8?Q?=C3=83=E2=80=9A=C3=82=C2=A8ve?= Noiseux [privateemail@hotmail.com](mailto:privateemail@hotmail.com)’. “” {“exception”:”[object] (Swift\_TransportException(code: 554): Expected response code 250 but got code “554”, with message “554 Transaction failed: Address length is more than 320 bytes long: ‘=?utf-8?Q?Genevi=C3=83=C6=92=C3=86=E2=80=99=C3=83=E2=80=A0?= =?utf-8?Q?=C3=A2=E2=82=AC=E2=84=A2=C3=83=C6=92=C3=A2=E2=82=AC=C2=A0?= =?utf-8?Q?=C3=83=C2=A2=C3=A2=E2=80=9A=C2=AC=C3=A2=E2=80=9E=C2=A2?= =?utf-8?Q?=C3=83=C6=92=C3=86=E2=80=99=C3=83=C2=A2=C3=A2=E2=80=9A?= =?utf-8?Q?=C2=AC=C3=85=C2=A1=C3=83=C6=92=C3=A2=E2=82=AC=C5=A1?= =?utf-8?Q?=C3=83=E2=80=9A=C3=82=C2=A8ve?= Noiseux [privateemail@hotmail.com](mailto:privateemail@hotmail.com)’.\r\n” at /home/privatet/public\_html/privatedomain.org/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:459)”,“command”:“mautic:emails:send”,“message”:“Expected response code 250 but got code “554”, with message “554 Transaction failed: Address length is more than 320 bytes long: ‘=?utf-8?Q?Genevi=C3=83=C6=92=C3=86=E2=80=99=C3=83=E2=80=A0?= =?utf-8?Q?=C3=A2=E2=82=AC=E2=84=A2=C3=83=C6=92=C3=A2=E2=82=AC=C2=A0?= =?utf-8?Q?=C3=83=C2=A2=C3=A2=E2=80=9A=C2=AC=C3=A2=E2=80=9E=C2=A2?= =?utf-8?Q?=C3=83=C6=92=C3=86=E2=80=99=C3=83=C2=A2=C3=A2=E2=80=9A?= =?utf-8?Q?=C2=AC=C3=85=C2=A1=C3=83=C6=92=C3=A2=E2=82=AC=C5=A1?= =?utf-8?Q?=C3=83=E2=80=9A=C3=82=C2=A8ve?= Noiseux [privateemail@hotmail.com](mailto:privateemail@hotmail.com)’.\r\n””}

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [October 31, 2021, 10:30pm UTC](https://forum.mautic.org/t/mautic-stops-sending-emails-when-configuration-is-set-to-queue-emails/20234/7 "2021-10-31T22:30:47Z")

</div>

Are you sure you imported the emails right in your system? Not possible that emails and names are mashed together in your db? It happens when you choose the wrong separator by import.
