# Message frequency rule and email delete issue

**URL:** https://forum.mautic.org/t/message-frequency-rule-and-email-delete-issue/18232
**Category:** Product Support
**Tags:** mautic-3
**Created:** [February 20, 2021, 9:07am UTC](https://forum.mautic.org/t/message-frequency-rule-and-email-delete-issue/18232 "2021-02-20T09:07:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![lanaprinzip](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lanaprinzip/32/4481_2.png) [@lanaprinzip](https://forum.mautic.org/u/lanaprinzip)
#### Post date: [February 20, 2021, 9:07am UTC](https://forum.mautic.org/t/message-frequency-rule-and-email-delete-issue/18232/1 "2021-02-20T09:07:44Z")

</div>

**Your software**  
My Mautic version is: 3.2.5  
My PHP version is: 7.3.27

**Your problem**  
My problem is:

Thank you for Mautic, while not so easy to set up a great tool. Thank you also for supporting it.  
I do have two questions:

1.) in the global configuration we set the contact frequency to two (2) mails per week. We do send out “transactional” emails like double opt in and confirmation emails. Everything works. We found out, that in our case “marketing” emails are NOT sent out the same week like transactional emails. From the docs I did find I thought that transactional emails are NOT counted (see: [Frequency rule — Acquia Product Documentation](https://docs.acquia.com/campaign-studio/channels/emails/frequency-rule/). In our case they definitely are. When I manually change one test contact to e.g. 7 mails a day, the marketing message does send normally (even there were e.g. 2 transactional campaign messages beforehand). If I only leave the global option to two messages a week and there were 2 transactional campaign messages, the marketing email is queued/waiting. Any idea or is this normal behaviour?

2.) I seem to be unable to DELETE test email messages under channels/emails. If I click delete simply nothing happens. This means I am unable to remove test emails.

Thank you,  
Matt

---

<div class="post-metadata">

### Author: ![appsinvent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/appsinvent/32/13786_2.png) [@appsinvent](https://forum.mautic.org/u/appsinvent)
#### Post date: [February 20, 2021, 6:15pm UTC](https://forum.mautic.org/t/message-frequency-rule-and-email-delete-issue/18232/2 "2021-02-20T18:15:41Z")

</div>

Did you look at the logs when you click delete ?

---

<div class="post-metadata">

### Author: ![lanaprinzip](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lanaprinzip/32/4481_2.png) [@lanaprinzip](https://forum.mautic.org/u/lanaprinzip)
#### Post date: [February 20, 2021, 7:11pm UTC](https://forum.mautic.org/t/message-frequency-rule-and-email-delete-issue/18232/3 "2021-02-20T19:11:20Z")

</div>

Hi, thanks!

The log shows, that the DB goes away…

2021-02-20 20:08:22 Error 500 POST /s/emails/delete/12?mauticUserLastActive=31&mauticLastNotificationId= HTTP/1.0 [https://private.dom/s/emails](https://private.dom/s/emails) Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 893 SSL/TLS-Zugriff für Apache  
2021-02-20 20:08:24 Warning xxxx AH01071: Got error ‘PHP message: PHP Warning: mysqli\_stmt::execute(): MySQL server has gone away in /var/www/vhosts/private.dom/mautic path/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php on line 150PHP message: PHP Warning: mysqli\_stmt::execute(): Error reading result set’s header in /var/www/vhosts/mautic path /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php on line 150’, referer: [https://private.dom/s/emails](https://private.dom/s/emails)

---

<div class="post-metadata">

### Author: ![lanaprinzip](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lanaprinzip/32/4481_2.png) [@lanaprinzip](https://forum.mautic.org/u/lanaprinzip)
#### Post date: [February 22, 2021, 5:55pm UTC](https://forum.mautic.org/t/message-frequency-rule-and-email-delete-issue/18232/4 "2021-02-22T17:55:13Z")

</div>

Update: I was able to figure out the email frequency issue. Basically this was a cronjob issue with regards to " Send Scheduled Broadcasts". This is fixed.

The second issue remains. The DB goes away if I delete emails… Could the DB version be to high? Maria DB 10.3.27?

Thanks!

---

<div class="post-metadata">

### Author: ![lanaprinzip](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lanaprinzip/32/4481_2.png) [@lanaprinzip](https://forum.mautic.org/u/lanaprinzip)
#### Post date: [February 23, 2021, 12:17pm UTC](https://forum.mautic.org/t/message-frequency-rule-and-email-delete-issue/18232/5 "2021-02-23T12:17:38Z")

</div>

I was able to find the solution:

The error is caused, as I had not installed a Cron Job " /bin/console mautic:broadcasts:send --channel=email" yet.  
This caused a pending email in the email that I tried to delete. This caused the fatal error of the DB.  
After the Cron ran, the delete process worked fine.
