Support » Plugin: WP Mail Logging » Multiple recipients seperate by multiple newline characters

  • Resolved sebb87

    (@sebb87)


    Hi,

    another issue I experienced is that mails that I attempt to resend that were intended for multiple recipients seem to fail. Reason being is that they have multiple newline characters as an delimiter between recipients instead of just a plain comma.

    In WPML_Email_Resender.php I added the following which worked.
    $to = $mail->get_receiver();
    $to = str_replace([“\\n”, ‘ ‘], [”, ”], $to);

    Regards,
    Sebastian

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor No3x

    (@no3x)

    Please check with the next release. I have worked on this to ensure the to’s are stored as ,\n. The current (development) implemention seems to work well with this:

        $headers = explode( "\\n", str_replace( "\\r\\n", "\\n", $mail->get_headers() ) );
            $headers = array_map(function ($header) {
                return rtrim($header, ",");
            }, $headers);


    Oops, mistaken the code above with the headers implementation. Yes, your suggested change should work.

    • This reply was modified 7 months, 3 weeks ago by  No3x.
    Plugin Contributor No3x

    (@no3x)

    Plugin Contributor No3x

    (@no3x)

    1.9.0 is released

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multiple recipients seperate by multiple newline characters’ is closed to new replies.