diff --git a/wp-mail.php b/wp-mail.php index 2966dc3642..a8bcc59bfa 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -142,8 +142,8 @@ for ( $i = 1; $i <= $count; $i++ ) { $post_status = 'pending'; } - $subject = trim($subject); - + $subject = trim($subject); + if ( $content_type == 'multipart/alternative' ) { $content = explode('--'.$boundary, $content); $content = $content[2]; @@ -156,6 +156,10 @@ for ( $i = 1; $i <= $count; $i++ ) { } $content = trim($content); + //Give Post-By-Email extending plugins full access to the content + //Either the raw content or the content of the last quoted-printable section + $content = apply_filters('wp_mail_original_content', $content); + if ( false !== stripos($content_transfer_encoding, "quoted-printable") ) { $content = quoted_printable_decode($content); }