Details
Description
Description:
In CRM/Utils/Mail/EmailProcessor.php, just after CRM-11046 patch, $text is overwritten by a static string :
if (empty($text))
{ // If bounce processing fails, just take the raw body. Cf. CRM-11046 $text = $mail->generateBody(); // if text is still empty, lets fudge a blank text so the api call below will succeed $text = ts('We could not extract the mail body from this bounce message.'); }Symptoms :
Bounce processing is less accurate and display the static string too often.
Solution :
Another check should be place to check before the overwrite to check if $text is still empty.
Patch :
CRM/Utils/Mail/EmailProcessor.php
296,297c296,299
< // if text is still empty, lets fudge a blank text so the api call below will succeed
< $text = ts('We could not extract the mail body from this bounce message.');
—
> if (empty($text))
Alternate patch :
295,297c295,298
<
< // if text is still empty, lets fudge a blank text so the api call below will succeed
< $text = ts('We could not extract the mail body from this bounce message.');
—
> }
>
> if (empty($text)) {
> // if text is still empty, lets fudge a blank text so the api call below will succeed
> $text = ts('We could not extract the mail body from this bounce message.');