Could not update post in the database

If you ever see the message “Could not update post in the database” when researching why an email didn’t show up here are the things to check:

  • Click the Test Config button and look at the encoding section:
    • default_charset, DB_CHARSET, WordPress encoding and Postie encoding should all the same and are ideally UTF-8.
    • Verify that the DB_CHARSET actually matches the encoding on the database and the tables.
  • Consider upgrading your version of PHP to 5.6 or newer. Some users have reported that the error goes away when upgrading from PHP 5.3 to 5.6.
  • Consider upgrading MySQL. The function that detects the condition which causes this error relies on the database to do character set conversion/validation in some cases.
  • Add a pre_post_update filter and inspect the values in the $data parameter.