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.
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
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.”
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:
Spool folder is empty but yet the size is 16mb
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’. “” {“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’.\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’.\r\n””}
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.