Closed donmhico closed 1 year ago
This PR adds the ability to support UTF8-encoded subjects in the email logs table
Submit an email using wp_mail() with subject containing non ASCII characters. You can use the snippet below.
wp_mail()
add_action( 'init', function () { $to = 'donmhico+test1@gmail.com'; $subject = 'Subject with non ASCII ó¿¡á'; $message = 'Message with non ASCII ó¿¡á'; $headers = 'From: example@example.com'."\r\n" .'Content-Type: text/plain; charset=utf-8'."\r\n"; wp_mail( $to, '=?utf-8?B?'. base64_encode( $subject ) . '?=', $message, $headers ); } );
If you see the log details, you should also see this in HTML tab.
However, you should see the actual encoded subject in both RAW and JSON tab.
RAW
JSON
Description
This PR adds the ability to support UTF8-encoded subjects in the email logs table
Testing Procedure
Submit an email using
wp_mail()
with subject containing non ASCII characters. You can use the snippet below.If you see the log details, you should also see this in HTML tab.
However, you should see the actual encoded subject in both
RAW
andJSON
tab.