# Mautic sending email is too slow

**URL:** <https://forum.mautic.org/t/mautic-sending-email-is-too-slow/24387>\
**Category:** Product Support\
**Created:** [June 7, 2022, 4:20am UTC](https://forum.mautic.org/t/mautic-sending-email-is-too-slow/24387 "2022-06-07T04:20:25Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![carlosatfongo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/carlosatfongo/32/10223_2.png) [@carlosatfongo](https://forum.mautic.org/u/carlosatfongo)\
**Post date:** [October 31, 2023, 6:51pm UTC](https://forum.mautic.org/t/mautic-sending-email-is-too-slow/24387/18 "2023-10-31T18:51:55Z")

</div>

Yeah we cannot figure out how to run our own multithread script as a user other than root. Any suggestions?

The terminal command we use to trigger the script, logged in as any user (www-data, my account, IT Admin’s account) but root:

```auto
./multithread_send_test.sh

```

The script contents:

```auto
#!/bin/bash

echo "------------------------------------------------ START SCRIPT "
date
d=`date +%Y-%m-%d`
echo $d

echo "------------------------------------------------ START PHP Commands "
sudo -u www-data php /srv/mautic/bin/console mautic:emails:send --lock_mode=flock --lock-name="1" & sleep 2 & sudo -u www-data php /srv/mautic/bin/console mautic:emails:send --lock_mode=flock --lock-name="2"
echo "------------------------------------------------ END PHP Commands "

date
echo "------------------------------------------------ END SCRIPT "

```

We have the same issue with trying to user this user’s **SmartSend** script.

> [@Script to replace the mautic:emails:send cronjob](https://forum.mautic.org/t/script-to-replace-the-mauticsend-cronjob/29624):
>
> I’ve always had issues with my mautic:emails:send cronjob. If I put the send limit too low my emails don’t go out fast enough. If I put the limit too high I exceed the Amazon SES rate limit of 14 emails per second. So I made this script that does the best of both worlds… you can run it every 30sec-1min and it will check if there are mails to send. If no mails need to be sent it just exits without running mautic. If there are mails that need to go out, it will send EXACTLY 14 emails, wait 1 sec,…

---

_[View the full topic](https://forum.mautic.org/t/mautic-sending-email-is-too-slow/24387)._
