# Trouble setting up bounce management with Mailjet

**URL:** https://forum.mautic.org/t/trouble-setting-up-bounce-management-with-mailjet/19379
**Category:** Product Support
**Created:** [May 8, 2021, 1:09am UTC](https://forum.mautic.org/t/trouble-setting-up-bounce-management-with-mailjet/19379 "2021-05-08T01:09:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![keyleads](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/keyleads/32/957_2.png) [@keyleads](https://forum.mautic.org/u/keyleads)
#### Post date: [May 8, 2021, 1:09am UTC](https://forum.mautic.org/t/trouble-setting-up-bounce-management-with-mailjet/19379/1 "2021-05-08T01:09:04Z")

</div>

**Your software**  
My Mautic version is: 2.16.2  
My PHP version is: 7.1.33  
My Database type and version is: percona-server:5.7

**Your problem**  
My problem is:  
I’m having trouble setting up bounce management in mautic. I’m using mailjet as my SMTP and followed the instructions in the mautic documentation here…[Bounce management | Mautic](https://docs.mautic.org/en/channels/emails/bounce-management).

When I add the endpoint URL to mailjet and then test I get the following error “Please provide a valid endpoint url first.”

This is a screenshot of what it looks like…

 ![Endpoint URL Error](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/a6f9fc8c3fbde0b7dda3234508ea675b037060e6.png)

These errors are showing in the log:  
[2021-05-07 11:00:03] mautic.NOTICE: Swift\_TransportException: Unable to connect with TLS encryption (uncaught exception) at /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php line 314 while running console command `mautic:emails:send`    
[2021-05-07 12:00:03] mautic.NOTICE: Swift\_TransportException: Unable to connect with TLS encryption (uncaught exception) at /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php line 314 while running console command `mautic:emails:send`    
[2021-05-07 21:04:00] mautic.ERROR: Serialized array includes null-byte. This cannot be saved as a text. Please check if you not provided object with protected or private members. {“exception”:"[object] (Doctrine\DBAL\Types\ConversionException(code: 0): Serialized array includes null-byte. This cannot be saved as a text. Please check if you not provided object with protected or private members. at /var/www/html/app/bundles/CoreBundle/Doctrine/Type/ArrayType.php:46)"}   
[2021-05-07 21:04:00] mautic.CRITICAL: Uncaught PHP Exception Doctrine\ORM\ORMException: “The EntityManager is closed.” at /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php line 144 {“exception”:"[object] (Doctrine\ORM\ORMException(code: 0): The EntityManager is closed. at /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php:144)"}   
[2021-05-07 21:04:01] mautic.ERROR: Serialized array includes null-byte. This cannot be saved as a text. Please check if you not provided object with protected or private members. {“exception”:"[object] (Doctrine\DBAL\Types\ConversionException(code: 0): Serialized array includes null-byte. This cannot be saved as a text. Please check if you not provided object with protected or private members. at /var/www/html/app/bundles/CoreBundle/Doctrine/Type/ArrayType.php:46)"}   
[2021-05-07 21:04:01] mautic.CRITICAL: Uncaught PHP Exception Doctrine\ORM\ORMException: “The EntityManager is closed.” at /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php line 144 {“exception”:"[object] (Doctrine\ORM\ORMException(code: 0): The EntityManager is closed. at /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php:144)"}   
[2021-05-07 21:04:01] mautic.ERROR: An exception occurred while executing ‘INSERT INTO page\_hits (date\_hit, date\_left, country, region, city, isp, organization, code, referer, url, url\_title, user\_agent, remote\_host, page\_language, browser\_languages, tracking\_id, source, source\_id, query, page\_id, redirect\_id, email\_id, lead\_id, ip\_id, device\_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [“2021-05-07 21:04:01”, null, null, null, null, null, null, 404, null, null, null, null, null, null, “a:0:{}”, “rah7cwc37ja2o5sfnzq8rtz”, null, null, “\x61\x3a\x34\x3a\x7b\x73\x3a\x32\x3a\x22\xac\xed\x22\x3b\x73\x3a\x33\x32\x3a\x22\x3d\x20\x7c\x62\x61\x73\x65\x36\x34\x20\x2d\x64\x7c\x62\x61\x73\x68\x20\x3e\x20\x2f\x64\x65\x76\x2f\x6e\x75\x6c\x6c\x20\x32\x3e\x22\x3b\x73\x3a\x32\x3a\x22\x31\x5f\x22\x3b\x73\x3a\x30\x3a\x22\x22\x3b\x73\x3a\x31\x3a\x22\x71\x22\x3b\x73\x3a\x30\x3a\x22\x22\x3b\x73\x3a\x38\x3a\x22\x70\x61\x67\x65\x5f\x75\x72\x6c\x22\x3b\x73\x3a\x33\x38\x3a\x22\x68\x74\x74\x70\x3a\x2f\x2f\x31\x30\x34\x2e\x32\x35\x31\x2e\x32\x31\x31\x2e\x32\x30\x2f\x69\x6e\x76\x6f\x6b\x65\x72\x2f\x72\x65\x61\x64\x6f\x6e\x6c\x79\x22\x3b\x7d”, null, null, null, null, 28, 46]: SQLSTATE[HY000]: General error: 1366 Incorrect string value: ‘\xAC\xED";s:…’ for column ‘query’ at row 1 {“exception”:"[object] (Doctrine\DBAL\Exception\DriverException(code: 0): An exception occurred while executing ‘INSERT INTO page\_hits (date\_hit, date\_left, country, region, city, isp, organization, code, referer, url, url\_title, user\_agent, remote\_host, page\_language, browser\_languages, tracking\_id, source, source\_id, query, page\_id, redirect\_id, email\_id, lead\_id, ip\_id, device\_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [“2021-05-07 21:04:01”, null, null, null, null, null, null, 404, null, null, null, null, null, null, “a:0:{}”, “rah7cwc37ja2o5sfnzq8rtz”, null, null, “\x61\x3a\x34\x3a\x7b\x73\x3a\x32\x3a\x22\xac\xed\x22\x3b\x73\x3a\x33\x32\x3a\x22\x3d\x20\x7c\x62\x61\x73\x65\x36\x34\x20\x2d\x64\x7c\x62\x61\x73\x68\x20\x3e\x20\x2f\x64\x65\x76\x2f\x6e\x75\x6c\x6c\x20\x32\x3e\x22\x3b\x73\x3a\x32\x3a\x22\x31\x5f\x22\x3b\x73\x3a\x30\x3a\x22\x22\x3b\x73\x3a\x31\x3a\x22\x71\x22\x3b\x73\x3a\x30\x3a\x22\x22\x3b\x73\x3a\x38\x3a\x22\x70\x61\x67\x65\x5f\x75\x72\x6c\x22\x3b\x73\x3a\x33\x38\x3a\x22\x68\x74\x74\x70\x3a\x2f\x2f\x31\x30\x34\x2e\x32\x35\x31\x2e\x32\x31\x31\x2e\x32\x30\x2f\x69\x6e\x76\x6f\x6b\x65\x72\x2f\x72\x65\x61\x64\x6f\x6e\x6c\x79\x22\x3b\x7d”, null, null, null, null, 28, 46]:\n\nSQLSTATE[HY000]: General error: 1366 Incorrect string value: ‘\xAC\xED";s:…’ for column ‘query’ at row 1 at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115, Doctrine\DBAL\Driver\PDOException(code: HY000): SQLSTATE[HY000]: General error: 1366 Incorrect string value: ‘\xAC\xED";s:…’ for column ‘query’ at row 1 at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: HY000): SQLSTATE[HY000]: General error: 1366 Incorrect string value: ‘\xAC\xED";s:…’ for column ‘query’ at row 1 at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105)"}   
[2021-05-07 21:04:01] mautic.CRITICAL: Uncaught PHP Exception Doctrine\ORM\ORMException: “The EntityManager is closed.” at /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php line 144 {“exception”:"[object] (Doctrine\ORM\ORMException(code: 0): The EntityManager is closed. at /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php:144)"}   
[2021-05-07 21:04:02] mautic.ERROR: Serialized array includes null-byte. This cannot be saved as a text. Please check if you not provided object with protected or private members. {“exception”:"[object] (Doctrine\DBAL\Types\ConversionException(code: 0): Serialized array includes null-byte. This cannot be saved as a text. Please check if you not provided object with protected or private members. at /var/www/html/app/bundles/CoreBundle/Doctrine/Type/ArrayType.php:46)"}   
[2021-05-07 21:04:02] mautic.CRITICAL: Uncaught PHP Exception Doctrine\ORM\ORMException: “The EntityManager is closed.” at /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php line 144 {“exception”:"[object] (Doctrine\ORM\ORMException(code: 0): The EntityManager is closed. at /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php:144)"}   
[2021-05-07 22:15:03] mautic.NOTICE: Swift\_TransportException: Unable to connect with TLS encryption (uncaught exception) at /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php line 314 while running console command `mautic:emails:send`

Steps I have tried to fix the problem:

1. I tested the endpoint URL by pasting into a browser and I get a “success” message so it appears to be working correctly.
2. I disabled firewall
3. Contacted customer support at mailjet but no response yet. Not sure if it’s a mautic problem or mailjet.
