# Campaign Email Not Sending ::  Custom Email Getting 500 Internal Server Error

**URL:** <https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313>\
**Category:** Product Support\
**Created:** [January 26, 2016, 4:46am UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313 "2016-01-26T04:46:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 26, 2016, 4:46am UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/1 "2016-01-26T04:46:15Z")

</div>

I’m using version 1.2.3, set to automatically send emails. I’m using Mandrill and when I click the test button in config it says successful. Also, I get the test email. I have a simple campaign set so that when a lead is added to a list it sends an email. The email is never sent. I did the same when a form is submitted, but the email doesn’t get sent.  
  
  
  
Also, when I go to a lead and try to email them I get a 500 Internal Server Error. I’m using a Hostmonster VPS.  
  
  
  
Any ideas?  
  
  
  
 ![Capture.png](http://s14.postimg.org/gb8i884g1/Capture.png)

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 26, 2016, 4:46am UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/2 "2016-01-26T04:46:15Z")

</div>

I’m using version 1.2.3, set to automatically send emails. I’m using Mandrill and when I click the test button in config it says successful. Also, I get the test email. I have a simple campaign set so that when a lead is added to a list it sends an email. The email is never sent. I did the same when a form is submitted, but the email doesn’t get sent.

Also, when I go to a lead and try to email them I get a 500 Internal Server Error. I’m using a Hostmonster VPS.

Any ideas?

![](http://s14.postimg.org/gb8i884g1/Capture.png)

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 26, 2016, 5:02am UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/3 "2016-01-26T05:02:16Z")

</div>

I just updated to 1.2.4 and I’m still having the same issues.

---

<div class="post-metadata">

**Author:** ![rodfernand](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rodfernand](https://forum.mautic.org/u/rodfernand)\
**Post date:** [January 26, 2016, 5:13am UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/4 "2016-01-26T05:13:20Z")

</div>

@DavidNJohnson what do the logs say?

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 26, 2016, 5:20am UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/5 "2016-01-26T05:20:50Z")

</div>

[2016-01-26 02:50:02] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as max\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mau\_lead\_lists\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_leads.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-26 02:50:02’) AND (NOT EXISTS (SELECT null FROM mau\_campaign\_leads campaign\_leads WHERE (campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually\_removed = ?) AND (campaign\_leads.campaign\_id = 2)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list\_leads.date\_added \<= ‘2016-01-26 02:50:02’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command `mautic:campaigns:update` [] []  
[2016-01-26 03:20:02] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as max\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mau\_lead\_lists\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_leads.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-26 03:20:02’) AND (NOT EXISTS (SELECT null FROM mau\_campaign\_leads campaign\_leads WHERE (campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually\_removed = ?) AND (campaign\_leads.campaign\_id = 2)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list\_leads.date\_added \<= ‘2016-01-26 03:20:02’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command `mautic:campaigns:update` [] []  
[2016-01-26 03:25:02] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as max\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mau\_lead\_lists\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_leads.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-26 03:25:02’) AND (NOT EXISTS (SELECT null FROM mau\_campaign\_leads campaign\_leads WHERE (campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually\_removed = ?) AND (campaign\_leads.campaign\_id = 2)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list\_leads.date\_added \<= ‘2016-01-26 03:25:02’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command `mautic:campaigns:update` [] []  
[2016-01-26 03:30:02] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as max\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mau\_lead\_lists\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_leads.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-26 03:30:02’) AND (NOT EXISTS (SELECT null FROM mau\_campaign\_leads campaign\_leads WHERE (campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually\_removed = ?) AND (campaign\_leads.campaign\_id = 2)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list\_leads.date\_added \<= ‘2016-01-26 03:30:02’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command `mautic:campaigns:update` [] []  
[2016-01-26 04:00:02] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as max\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mau\_lead\_lists\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_leads.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-26 04:00:02’) AND (NOT EXISTS (SELECT null FROM mau\_campaign\_leads campaign\_leads WHERE (campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually\_removed = ?) AND (campaign\_leads.campaign\_id = 2)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list\_leads.date\_added \<= ‘2016-01-26 04:00:02’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command `mautic:campaigns:update` [] []  
[2016-01-26 04:30:02] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as max\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mau\_lead\_lists\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_leads.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-26 04:30:02’) AND (NOT EXISTS (SELECT null FROM mau\_campaign\_leads campaign\_leads WHERE (campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually\_removed = ?) AND (campaign\_leads.campaign\_id = 2)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list\_leads.date\_added \<= ‘2016-01-26 04:30:02’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command `mautic:campaigns:update` [] []  
[2016-01-26 04:34:19] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 04:34:53] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 04:50:14] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 05:11:27] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 26, 2016, 8:00am UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/6 "2016-01-26T08:00:57Z")

</div>

@DavidNJohnson this SQL error was fixed in 1.2.4

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 26, 2016, 2:30pm UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/7 "2016-01-26T14:30:52Z")

</div>

Strange, I did update and I’m still having the issue.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 26, 2016, 2:35pm UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/8 "2016-01-26T14:35:42Z")

</div>

There are many issues in your log. What issue remain after the update?

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 26, 2016, 2:38pm UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/9 "2016-01-26T14:38:28Z")

</div>

These are all from Today:

[2016-01-26 03:25:02] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as max\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mau\_lead\_lists\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_leads.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-26 03:25:02’) AND (NOT EXISTS (SELECT null FROM mau\_campaign\_leads campaign\_leads WHERE (campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually\_removed = ?) AND (campaign\_leads.campaign\_id = 2)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list\_leads.date\_added \<= ‘2016-01-26 03:25:02’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command `mautic:campaigns:update` [] []  
[2016-01-26 03:30:02] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as max\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mau\_lead\_lists\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_leads.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-26 03:30:02’) AND (NOT EXISTS (SELECT null FROM mau\_campaign\_leads campaign\_leads WHERE (campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually\_removed = ?) AND (campaign\_leads.campaign\_id = 2)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list\_leads.date\_added \<= ‘2016-01-26 03:30:02’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command `mautic:campaigns:update` [] []  
[2016-01-26 04:00:02] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as max\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mau\_lead\_lists\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_leads.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-26 04:00:02’) AND (NOT EXISTS (SELECT null FROM mau\_campaign\_leads campaign\_leads WHERE (campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually\_removed = ?) AND (campaign\_leads.campaign\_id = 2)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list\_leads.date\_added \<= ‘2016-01-26 04:00:02’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command `mautic:campaigns:update` [] []  
[2016-01-26 04:30:02] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as max\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mau\_lead\_lists\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_leads.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-26 04:30:02’) AND (NOT EXISTS (SELECT null FROM mau\_campaign\_leads campaign\_leads WHERE (campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually\_removed = ?) AND (campaign\_leads.campaign\_id = 2)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list\_leads.date\_added \<= ‘2016-01-26 04:30:02’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command `mautic:campaigns:update` [] []  
[2016-01-26 04:34:19] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 04:34:53] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 04:50:14] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 05:11:27] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 05:30:03] mautic.ERROR: Swift\_RfcComplianceException: Address set in PathHeader does not comply with addr-spec of RFC 2822. (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 while running console command `mautic:campaigns:trigger` [] []  
[2016-01-26 14:31:56] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 26, 2016, 2:39pm UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/10 "2016-01-26T14:39:11Z")

</div>

Looks like my server time is off. Hard to tell which ones are new.

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 26, 2016, 6:25pm UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/11 "2016-01-26T18:25:57Z")

</div>

Okay, these should all be since the update:

[2016-01-26 04:00:02] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as max\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mau\_lead\_lists\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_leads.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-26 04:00:02’) AND (NOT EXISTS (SELECT null FROM mau\_campaign\_leads campaign\_leads WHERE (campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually\_removed = ?) AND (campaign\_leads.campaign\_id = 2)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list\_leads.date\_added \<= ‘2016-01-26 04:00:02’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command `mautic:campaigns:update` [] []  
[2016-01-26 04:30:02] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list\_leads.lead\_id) as max\_id, count(distinct(list\_leads.lead\_id)) as lead\_count FROM mau\_lead\_lists\_leads list\_leads WHERE (list\_leads.manually\_removed = ?) AND (list\_leads.leadlist\_id IN ()) AND (list\_leads.date\_added \<= ‘2016-01-26 04:30:02’) AND (NOT EXISTS (SELECT null FROM mau\_campaign\_leads campaign\_leads WHERE (campaign\_leads.lead\_id = list\_leads.lead\_id) AND (campaign\_leads.manually\_removed = ?) AND (campaign\_leads.campaign\_id = 2)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list\_leads.date\_added \<= ‘2016-01-26 04:30:02’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command `mautic:campaigns:update` [] []  
[2016-01-26 04:34:19] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 04:34:53] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 04:50:14] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 05:11:27] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 05:30:03] mautic.ERROR: Swift\_RfcComplianceException: Address set in PathHeader does not comply with addr-spec of RFC 2822. (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 while running console command `mautic:campaigns:trigger` [] []  
[2016-01-26 14:31:56] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 14:40:02] mautic.ERROR: Swift\_RfcComplianceException: Address set in PathHeader does not comply with addr-spec of RFC 2822. (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 while running console command `mautic:campaigns:trigger` [] []  
[2016-01-26 15:20:02] mautic.ERROR: Swift\_RfcComplianceException: Address set in PathHeader does not comply with addr-spec of RFC 2822. (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 while running console command `mautic:campaigns:trigger` [] []

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 26, 2016, 10:06pm UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/12 "2016-01-26T22:06:47Z")

</div>

I believe these are new since the update.

[2016-01-26 14:40:02] mautic.ERROR: Swift\_RfcComplianceException: Address set in PathHeader does not comply with addr-spec of RFC 2822. (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 while running console command `mautic:campaigns:trigger` [] []  
[2016-01-26 15:20:02] mautic.ERROR: Swift\_RfcComplianceException: Address set in PathHeader does not comply with addr-spec of RFC 2822. (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 while running console command `mautic:campaigns:trigger` [] []  
[2016-01-26 18:27:07] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-26 18:40:04] mautic.ERROR: Swift\_RfcComplianceException: Address set in PathHeader does not comply with addr-spec of RFC 2822. (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 while running console command `mautic:campaigns:trigger` [] []  
[2016-01-26 19:15:02] mautic.ERROR: Swift\_RfcComplianceException: Address set in PathHeader does not comply with addr-spec of RFC 2822. (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 while running console command `mautic:campaigns:trigger` [] []

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 27, 2016, 7:21am UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/13 "2016-01-27T07:21:18Z")

</div>

Ok, so the SQL errors are gone. That’s good. Could you describe your email setup? Steps how to replicate those errors?

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 27, 2016, 6:51pm UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/14 "2016-01-27T18:51:51Z")

</div>

Yes. I’m using Mandrill. I test the connection and it works, it will even send me a test email.

I have a campaign set up to send out an email when it comes in. The lead source is set to Campaign Form with an Action being send email. I can see in the lead info where it says triggered send email event but they never go out. I know that because I don’t see them when I log into Mandrill.

Also, when I try to send an email to a lead, directly, I get the error I mentioned above. I get the same error message when I try to send a sample email to myself from the emails section.

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 27, 2016, 8:20pm UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/15 "2016-01-27T20:20:27Z")

</div>

Not sure if this will help, but this is what’s currently in the error log:

[2016-01-27 16:12:06] mautic.WARNING: Command `mautic:leadlists:update` exited with status code 255 [] []  
[2016-01-27 16:12:06] mautic.ERROR: PDOException: SQLSTATE[HY000] [1040] Too many connections (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php line 40 while running console command `mautic:leadlists:update` [] []  
[2016-01-27 18:40:48] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []  
[2016-01-27 18:45:03] mautic.ERROR: Swift\_RfcComplianceException: Address set in PathHeader does not comply with addr-spec of RFC 2822. (uncaught exception) at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 while running console command `mautic:campaigns:trigger` [] []

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 28, 2016, 5:35pm UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/16 "2016-01-28T17:35:22Z")

</div>

So, my error log was blank this morning so I tried sending an email and I see this error in the log:

[2016-01-28 17:34:28] mautic.CRITICAL: Uncaught PHP Exception Swift\_RfcComplianceException: “Address set in PathHeader does not comply with addr-spec of RFC 2822.” at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 138 {“exception”:"[object] (Swift\_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /home/apps3ge/public\_html/marketing/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:138)"} []

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 28, 2016, 9:19pm UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/17 "2016-01-28T21:19:53Z")

</div>

I discussed the error log with @alanhartless . He thinks that…

> [@](#):
>
> The database error is something server side. Likely a small VPS with out of the box configs and not optimized thus mysql is getting killed. The swiftmailer error I’ve seen when a bad email is used in the Advanced tab of an Email.

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 28, 2016, 11:25pm UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/18 "2016-01-28T23:25:05Z")

</div>

We did have somebody optimize it pretty well, as we run our own Reputation Management software off of it., one that we developed in-house. I can get with my developer if you think something needs to be added to optimize it better.

---

<div class="post-metadata">

**Author:** ![DavidNJohnson](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DavidNJohnson](https://forum.mautic.org/u/DavidNJohnson)\
**Post date:** [January 28, 2016, 11:57pm UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/19 "2016-01-28T23:57:31Z")

</div>

I got him involved and he turned on some more debugging and come to find out I mistyped the bounce email and that’s what’s been causing it. I was just able to send myself an email and I got it. I used bounce. instead of bounce@

---

<div class="post-metadata">

**Author:** ![ajay](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@ajay](https://forum.mautic.org/u/ajay)\
**Post date:** [October 14, 2016, 6:28am UTC](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313/20 "2016-10-14T06:28:31Z")

</div>

I am facing the same problem.

Email sending works for test emails. However when a test email is sent for a small test list of 5 email ids, mautic confirms that the email is sent but they are not getting delivered!!  
Can someone help? Mautic Version 2.1.1.1 installed using Bitnami stacks( local install)

Thanks

[Next page](https://forum.mautic.org/t/campaign-email-not-sending-custom-email-getting-500-internal-server-error/3313.md?page=2)
