Problem sending mail with mailpress
-
I had a problem that when trying to subscribe via the widget there was an error. after debuging I found out the problem was some failure that was cause because of sending the to argument in this format: “[email protected] <[email protected]>”.
I don’t know why this should fail but it did. so before the sending of the email in the file: wp-content/plugins/mailpress/mp-includes/class/swift/Swift/Plugin/MailSend.php
line 160 function doMailI added:
/* removed all after @ in name… */
$SSS_mail_pos_start = strpos($to, ‘<‘);
$SSS_mail_pos_end = strpos($to, ‘>’);
echo “SSS_mail_pos_start: ‘$SSS_mail_pos_start’\n”;
echo “SSS_mail_pos_end: ‘$SSS_mail_pos_end’\n”;
if ($SSS_mail_pos_start <> $SSS_mail_pos_end) {
$SSS_name = substr($to, 0, $SSS_mail_pos_start – 1);
$SSS_email = substr($to, $SSS_mail_pos_start + 1, $SSS_mail_pos_end – $SSS_mail_pos_start – 1);
echo “SSS_name: ‘$SSS_name’\n”;
echo “SSS_email: ‘$SSS_email’\n”;
if ($SSS_name == $SSS_email) {
$SSS_strudel_pos = strpos($SSS_email, ‘@’);
echo “old to: $to”;
$to = substr($SSS_email, 0, $SSS_strudel_pos – 1) . ‘ <‘ . $SSS_email . ‘>’;
}
}
/* end of fix */and now it works fine.
please correct this.
- The topic ‘Problem sending mail with mailpress’ is closed to new replies.