# Mautic Ver 3.02 campaigns not sending email - Email not found or published

**URL:** <https://forum.mautic.org/t/mautic-ver-3-02-campaigns-not-sending-email-email-not-found-or-published/16520>\
**Category:** Product Support\
**Created:** [October 11, 2020, 5:20pm UTC](https://forum.mautic.org/t/mautic-ver-3-02-campaigns-not-sending-email-email-not-found-or-published/16520 "2020-10-11T17:20:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [October 11, 2020, 5:20pm UTC](https://forum.mautic.org/t/mautic-ver-3-02-campaigns-not-sending-email-email-not-found-or-published/16520/1 "2020-10-11T17:20:03Z")

</div>

**Your software**  
My Mautic version is: 3.02  
My PHP version is:7.2.34

**Your problem**  
My problem is: Emails triggered by campaigns are not being set

These errors are showing in the log: No errors showing

Steps I have tried to fix the problem:  
Emails are being sent by forms and when manually sent. Crons are working as other tasks run by the same campaign it firing. The email is showing in the contact’s history but with an error - this event encountered an error during the last attempt to process  
Last execution error: Email not found or published

But the email is most def published and exists. I have removed and re-added the email to the campaign, as well sent it manually with no issues.

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [October 11, 2020, 5:51pm UTC](https://forum.mautic.org/t/mautic-ver-3-02-campaigns-not-sending-email-email-not-found-or-published/16520/2 "2020-10-11T17:51:30Z")

</div>

I have tried creating a brand new campaign with brand new emails and all are failing with the same error message. As an experienced Mautic user I have spent hrs setting this particular instance up, complete with dynamic content and host of awesome features. It’s almost the culmination of all my years of Mautic experience. Now to fall at the last hurdle with a failure of a fundamental Mautic feature - campaign triggered emails, is infuriating to say the least.

I have deleted cache and checked logs - nothing. Just “Last execution error: Email not found or published” in the contact history logs.

I sincerely hope some kind soul in the Mautic community can take the time to help me fix this. All my other (23 and counting) Mautic installs work just fine. This instance is hosted on the same server as all the others.

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [October 11, 2020, 6:12pm UTC](https://forum.mautic.org/t/mautic-ver-3-02-campaigns-not-sending-email-email-not-found-or-published/16520/3 "2020-10-11T18:12:23Z")

</div>

> [@robm](#):
>
> **Your software**  
> My Mautic version is: 3.02  
> My PHP version is:7.2.34
> 
> **Your problem**  
> My problem is: Emails triggered by campaigns are not being set
> 
> These errors are showing in the log: No errors showing
> 
> Steps I have tried to fix the problem:  
> Emails are being sent by forms and when manually sent. Crons are working as other tasks run by the same campaign it firing. The email is showing in the contact’s history but with an error - this event encountered an error during the last attempt to process  
> Last execution error: Email not found or published
> 
> But the email is most def published and exists. I have removed and re-added the email to the campaign, as well sent it manually with no issues.

Finally got an error in the log

[2020-10-11 19:43:09] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\SyntaxErrorException: “An exception occurred while executing ‘REPLACE INTO maukw\_campaign\_lead\_event\_failed\_log( `log_id`, `date_added`, `reason`) SELECT id, :dateAdded as date\_added, :message as reason from maukw\_campaign\_lead\_event\_log WHERE is\_scheduled = 1 AND lead\_id = :contactId AND campaign\_id = :campaignId AND rotation = :rotation’: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':dateAdded as date\_added, :message as reason from maukw\_campaign\_lead\_event\_log ’ at line 2” at /home/company/demo.company.biz/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 79 {“exception”:“[object] (Doctrine\DBAL\Exception\SyntaxErrorException(code: 0): An exception occurred while executing ‘REPLACE INTO maukw\_campaign\_lead\_event\_failed\_log( `log_id`, `date_added`, `reason`)\nSELECT id, :dateAdded as date\_added, :message as reason from maukw\_campaign\_lead\_event\_log\nWHERE is\_scheduled = 1 AND lead\_id = :contactId AND campaign\_id = :campaignId AND rotation = :rotation’:\n\nYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘:dateAdded as date\_added, :message as reason from maukw\_campaign\_lead\_event\_log\n’ at line 2 at /home/company/demo.company.biz/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:79, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘:dateAdded as date\_added, :message as reason from maukw\_campaign\_lead\_event\_log\n’ at line 2 at /home/company/demo.company.biz/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:86)”}

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [October 12, 2020, 8:19am UTC](https://forum.mautic.org/t/mautic-ver-3-02-campaigns-not-sending-email-email-not-found-or-published/16520/4 "2020-10-12T08:19:24Z")

</div>

> <https://github.com/mautic/mautic/pull/6574>

solved the issue
