WordPress.org

Ready to get started?Download WordPress

Forums

Problem sending mail with mailpress (1 post)

  1. Simon
    Member
    Posted 5 years ago #

    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: "john@aol.com <john@aol.com>".
    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 doMail

    I 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.

    http://wordpress.org/extend/plugins/mailpress/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags