# Can't send email with Mautic 5.1.1

**URL:** <https://forum.mautic.org/t/cant-send-email-with-mautic-5-1-1/33920>\
**Category:** Product Support\
**Created:** [October 24, 2024, 2:17am UTC](https://forum.mautic.org/t/cant-send-email-with-mautic-5-1-1/33920 "2024-10-24T02:17:27Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![georg\_bnm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/georg_bnm/32/11081_2.png) [@georg\_bnm](https://forum.mautic.org/u/georg_bnm)\
**Post date:** [March 18, 2025, 9:33am UTC](https://forum.mautic.org/t/cant-send-email-with-mautic-5-1-1/33920/21 "2025-03-18T09:33:16Z")

</div>

Please share. I’ll take a look at it.

Thank you.

---

<div class="post-metadata">

**Author:** ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)\
**Post date:** [March 19, 2025, 3:42am UTC](https://forum.mautic.org/t/cant-send-email-with-mautic-5-1-1/33920/22 "2025-03-19T03:42:59Z")

</div>

This one sends like 600 or 900 emails per hour. Have the cron running like each minute or each 2 minutes.

This is the path I am using:  
/your\_path\_to\_mautic/var/lock/consume\_mautic.sh

And the content:

```auto
#!/bin/bash

# Path to lock file
LOCKFILE="/your_path_to_mautic/var/lock/consume_mautic.lock"

# Life time of lock file in seconds (2 minutes = 120 seconds)
LOCKFILE_TIMEOUT=120

# Verify if lock file is present/exists
if [-e $LOCKFILE]; then
    # Calculated time from when the file was created
    LOCKFILE_AGE=$(($(date +%s) - $(stat -c %Y $LOCKFILE)))

    # If lock file is older than timeout, remove it
    if [$LOCKFILE_AGE -ge $LOCKFILE_TIMEOUT]; then
        echo "Lockfile is older than $LOCKFILE_TIMEOUT seconds. Removing..."
        rm -f $LOCKFILE
    else
        echo "Process is already running, exiting..."
        exit 1
    fi
fi

# Create lock file
touch $LOCKFILE

# Run the message consume process for emails
/usr/bin/php /your_path_to_mautic/bin/console messenger:consume email --limit=90 --time-limit=60 --memory-limit=128M

# Remove lock file when finished
rm -f $LOCKFILE

# Exist successful
exit 0

```

[Previous page](https://forum.mautic.org/t/cant-send-email-with-mautic-5-1-1/33920.md?page=1)
