# Database error i sending mail

**URL:** <https://forum.mautic.org/t/database-error-i-sending-mail/5551>\
**Category:** Product Support\
**Created:** [September 6, 2016, 2:53pm UTC](https://forum.mautic.org/t/database-error-i-sending-mail/5551 "2016-09-06T14:53:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antonio\_Lazzari](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@Antonio\_Lazzari](https://forum.mautic.org/u/Antonio_Lazzari)\
**Post date:** [September 6, 2016, 2:53pm UTC](https://forum.mautic.org/t/database-error-i-sending-mail/5551/1 "2016-09-06T14:53:06Z")

</div>

When I try to send an email I had this problems:  
  
[2016-09-06 15:46:09] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionUniqueConstraintViolationException: “An exception occurred while executing ‘INSERT INTO maugl\_channel\_url\_trackables (channel\_id, channel, hits, unique\_hits, redirect\_id) VALUES (?, ?, ?, ?, ?)’ with params [36, “email”, 0, 0, 1383]: Duplicate entry ‘email-0-0’ for key ‘PRIMARY’” at /home/…/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 66 {“exception”:"[object] (Doctrine\DBAL\Exception\UniqueConstraintViolationException(code: 0): An exception occurred while executing ‘INSERT INTO maugl\_channel\_url\_trackables (channel\_id, channel, hits, unique\_hits, redirect\_id) VALUES (?, ?, ?, ?, ?)’ with params [36, “email”, 0, 0, 1383]:nnDuplicate entry ‘email-0-0’ for key ‘PRIMARY’ at /home/…/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:66, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): Duplicate entry ‘email-0-0’ for key ‘PRIMARY’ at /home/…/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:165)"} []  
  
  
  
I understand that I have a duplicate key. Someone know What I had to do? I can’t send email.

---

<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:** [September 8, 2016, 6:40am UTC](https://forum.mautic.org/t/database-error-i-sending-mail/5551/2 "2016-09-08T06:40:45Z")

</div>

Is that a one time thing or does it happen with every email? If so, provide the steps to replicate it, please.

---

<div class="post-metadata">

**Author:** ![Antonio\_Lazzari](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@Antonio\_Lazzari](https://forum.mautic.org/u/Antonio_Lazzari)\
**Post date:** [September 6, 2016, 2:53pm UTC](https://forum.mautic.org/t/database-error-i-sending-mail/5551/3 "2016-09-06T14:53:06Z")

</div>

When I try to send an email I had this problems:  
[2016-09-06 15:46:09] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALExceptionUniqueConstraintViolationException: “An exception occurred while executing ‘INSERT INTO maugl\_channel\_url\_trackables (channel\_id, channel, hits, unique\_hits, redirect\_id) VALUES (?, ?, ?, ?, ?)’ with params [36, “email”, 0, 0, 1383]: Duplicate entry ‘email-0-0’ for key ‘PRIMARY’” at /home/…/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 66 {“exception”:"[object] (Doctrine\DBAL\Exception\UniqueConstraintViolationException(code: 0): An exception occurred while executing ‘INSERT INTO maugl\_channel\_url\_trackables (channel\_id, channel, hits, unique\_hits, redirect\_id) VALUES (?, ?, ?, ?, ?)’ with params [36, “email”, 0, 0, 1383]:nnDuplicate entry ‘email-0-0’ for key ‘PRIMARY’ at /home/…/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:66, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): Duplicate entry ‘email-0-0’ for key ‘PRIMARY’ at /home/…/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:165)"} []

I understand that I have a duplicate key. Someone know What I had to do? I can’t send email.
