Your software
My Mautic version is: 4.1.0
My PHP version is: 7.4.27
My Database type and version is: MySQL (mysqli) 8,.0.27
Your problem
My problem is: Cannot send emails, getting sql related error
These errors are showing in the log:
[2021-12-16 02:27:43] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing 'INSERT INTO page_redirects (is_published, date_added, created_by, created_by_user, date_modified, modified_by, modified_by_user, checked_out, checked_out_by, checked_out_by_user, redirect_id, url, hits, unique_hits) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [1, "2021-12-16 00:27:43", 1, "Nikos Lykakis", null, null, null, null, null, null, "4a5e3dad01994acab728b06bd", "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x77\x77\x77\x2e\x62\x6f\x75\x72\x64\x65\x6c\x61\x2e\x63\x6f\x6d\x2f\x5d\xce\xa3\xcf\x5f\xce\xbd\xce\xb4\xce\xb5\xcf\x83\xce\xb7\x2f", 0, 0]: Incorrect string value: '\xCF_\xCE\xBD\xCE\xB4...' for column 'url' at row 1" at D:\inetpub\vhosts\*****.com\wwwroot\m.*****.com\public\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\AbstractMySQLDriver.php line 128 {"exception":"[object] (Doctrine\\DBAL\\Exception\\DriverException(code: 0): An exception occurred while executing 'INSERT INTO page_redirects (is_published, date_added, created_by, created_by_user, date_modified, modified_by, modified_by_user, checked_out, checked_out_by, checked_out_by_user, redirect_id, url, hits, unique_hits) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [1, \"2021-12-16 00:27:43\", 1, \"Nikos Lykakis\", null, null, null, null, null, null, \"4a5e3dad01994acab728b06bd\", \"\\x68\\x74\\x74\\x70\\x73\\x3a\\x2f\\x2f\\x77\\x77\\x77\\x2e\\x62\\x6f\\x75\\x72\\x64\\x65\\x6c\\x61\\x2e\\x63\\x6f\\x6d\\x2f\\x5d\\xce\\xa3\\xcf\\x5f\\xce\\xbd\\xce\\xb4\\xce\\xb5\\xcf\\x83\\xce\\xb7\\x2f\", 0, 0]:\n\nIncorrect string value: '\\xCF_\\xCE\\xBD\\xCE\\xB4...' for column 'url' at row 1 at D:\\inetpub\\vhosts\\*****.com\\wwwroot\\m.*****.com\\public\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\AbstractMySQLDriver.php:128, Doctrine\\DBAL\\Driver\\Mysqli\\Exception\\StatementError(code: 0): Incorrect string value: '\\xCF_\\xCE\\xBD\\xCE\\xB4...' for column 'url' at row 1 at D:\\inetpub\\vhosts\\*****.com\\wwwroot\\m.*****.com\\public\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\Mysqli\\Exception\\StatementError.php:19)"} []
Steps I have tried to fix the problem:
I have tried switching between mysql_pdo and mysqli but didn not help.
Weirdly, switching to PHP8 solved this particular problem (but created others, as php8 is not yet supported by mautic)