# Amazon SES API is not working

**URL:** <https://forum.mautic.org/t/amazon-ses-api-is-not-working/16078>\
**Category:** Product Support\
**Created:** [September 14, 2020, 5:10pm UTC](https://forum.mautic.org/t/amazon-ses-api-is-not-working/16078 "2020-09-14T17:10:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![webpros](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/webpros/32/3345_2.png) [@webpros](https://forum.mautic.org/u/webpros)\
**Post date:** [September 14, 2020, 5:10pm UTC](https://forum.mautic.org/t/amazon-ses-api-is-not-working/16078/1 "2020-09-14T17:10:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![webpros](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/webpros/32/3345_2.png) [@webpros](https://forum.mautic.org/u/webpros)\
**Post date:** [September 14, 2020, 9:30pm UTC](https://forum.mautic.org/t/amazon-ses-api-is-not-working/16078/2 "2020-09-14T21:30:02Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![webpros](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/webpros/32/3345_2.png) [@webpros](https://forum.mautic.org/u/webpros)\
**Post date:** [September 14, 2020, 11:20pm UTC](https://forum.mautic.org/t/amazon-ses-api-is-not-working/16078/3 "2020-09-14T23:20:14Z")

</div>

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 [] []`

> <https://github.com/mautic/mautic/issues/9156>
>
> Mautic Version : 3.1
> Php : 7.2
> Description: I tried to send an email using AWS SES API with Queue file system option...

---

<div class="post-metadata">

**Author:** ![pveintimilla](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/pveintimilla/32/11743_2.png) [@pveintimilla](https://forum.mautic.org/u/pveintimilla)\
**Post date:** [April 6, 2024, 3:22pm UTC](https://forum.mautic.org/t/amazon-ses-api-is-not-working/16078/4 "2024-04-06T15:22:41Z")

</div>

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](https://github.com/pabloveintimilla/mautic-amazon-ses)

Regards!
