# Email sending via SendGrid APIs very slow

**URL:** <https://forum.mautic.org/t/email-sending-via-sendgrid-apis-very-slow/29147>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [September 1, 2023, 1:21am UTC](https://forum.mautic.org/t/email-sending-via-sendgrid-apis-very-slow/29147 "2023-09-01T01:21:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yball](https://avatars.discourse-cdn.com/v4/letter/y/c4cdca/32.png) [@yball](https://forum.mautic.org/u/yball)\
**Post date:** [September 1, 2023, 1:21am UTC](https://forum.mautic.org/t/email-sending-via-sendgrid-apis-very-slow/29147/1 "2023-09-01T01:21:30Z")

</div>

Hi,

I’ve been running and measuring the following commands using SendGrid APIs email setting and various batch/limit sizes, and local DB.

- php bin/console mautic:broadcasts:send --channel=email --limit=800 --batch-size=800 --no-interaction --no-ansi  
php bin/console mautic:emails:send --message-limit=800 --no-interaction --no-ansi

The results are less than impressive considering we have 100K emails to send:  
**29 minutes** : mautic:broadcasts:send --channel=email --limit=800 --batch-size=800, mautic:emails:send --message-limit=800  
**3 minutes** : mautic:broadcasts:send --channel=email --limit=100 --batch-size=100, mautic:emails:send --message-limit=100

800 emails with Mailhog local smtp took 47 seconds. MailGun is faster than SendGrid but also not spectacular.

Does Mautic use SendGrid batch apis or sends them 1 by 1? It appears it’s 1 by 1 based on how the emails were arriving (each message had a separate id and a time stamp). What SendGrid endpoint is being called by Mautic? Where in source code can I find the SendGrid api functionality for closer examination?

We have 8GB of RAM and 2 CPU cores. Are others also experiencing similar performance? We were able to get to 10 emails per second with SES API.

Thanks,

- Yev
