Details
Description
In CRM_Mailing_Event_BAO_Reply::send(), the Return-Path header may have invalid formatting. Specifically, I encountered the form "<person@domain.com>". Certain MTAs with certain configuration (including Exim in this particular case) reject this header and refuse to send the mailing.
My quick fix was to add the following:
$b = $parsed->generateBody();
+ // Fix bug where Return-Path has invalid format.
+ $h['Return-Path'] = trim($h['Return-Path'], '<>');
// FIXME: ugly hack - find the first MIME boundary in
// the body and make the boundary in the header match it
I also noticed the return of $mailer->send() isn't being checked for errors. If it had been, this would have been much easier to catch.