Amazon SES API is not working

Your software
My Mautic version is: 3.1.0
My PHP version is: 7.2

Your problem
Amazon SES API is not working… When I change to ‘sendmail’ or ‘Amazon SES SMTP’ the campaigns work and emails are sent…

These errors are showing in the log:
[2020-09-14 17:08:12] mautic.NOTICE: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined function bandwidthThrottle\tokenBucket\util\bcsub() (uncaught exception) at /var/www/vhosts/mautic.webpros.marketing/httpdocs/vendor/bandwidth-throttle/token-bucket/classes/util/TokenConverter.php line 80 while running console command mautic:campaigns:trigger
[2020-09-14 17:08:12] mautic.WARNING: Command mautic:campaigns:trigger exited with status code 1

Steps I have tried to fix the problem:
Downgrade php 7.3 to 7.2, restart server, delete cache folder…

1 Like

I searched online and found the solution by running the following command to make sure to have bcmath installed in all php versions…

sudo apt-get install php7.1-bcmath
sudo apt-get install php7.2-bcmath
sudo apt-get install php7.3-bcmath
sudo apt-get install php7.4-bcmath

After that I also had to select email queue in email configuration and set 36 emails per 1 second (as my Amazon SES limits…)

Hope this works for people experiencing the same issue…

But now I´m getting the following error:

2020-09-14 21:57:04] mautic.NOTICE: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Swift_Message::getAttachments() (uncaught exception) at /var/www/vhosts/mautic.webpros.marketing/httpdocs/app/bundles/EmailBundle/Swiftmailer/Transport/AmazonApiTransport.php line 195 while running console command mautic:emails:send [] [] [2020-09-14 21:57:04] mautic.WARNING: Command mautic:emails:send exited with status code 1 [] []

1 Like

Hi,

I have develop a plugin to Mautic 5.

You can try in: GitHub - pabloveintimilla/mautic-amazon-ses: Mautic 5 plugin, provides Amazon SES as an email transport and callback to process bounces

Regards!