Details
Description
When a bounce message is generated for a bad email in the civiEmail component the bounce message may be longer than the 255 characters defined in the MySQL field. If this occurs then you get a generic "DB Error: unknown error". The backtrace leads to the problem which lies in the file CRM\Mailing\Event\BAO\Bounce.php around line 77. It can be resolved by adding a substr line around this part of the code so that the string is not larger than the 255 character max
if (empty($params['bounce_type_id'])) {
$params['bounce_type_id'] = 11;
if (empty($params['bounce_reason']))
}
+++ $params['bounce_reason'] = substr($params['bounce_reason'], 0, 254);
$bounce->copyValues($params);
$bounce->save();
$success = TRUE;