Trouble setting up bounce management with Mailjet

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.

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…

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.
1 Like