Is your plugin online somewhere? Share a link?
No, the plugin is not online. I built it with bits of code and tuts across the web about customizing WordPress notification emails. if you can send me an email address (please black this out **** (removed at users request ~hnla)) I can send you the plugin and you look it over. I saw on the web that you should remove filter after applying it but it didn’t seem to have any affect.
remove_filter( 'wp_mail_content_type','mycustom_mail_content_type' );
Hi, Paul. If you cold be so kind to remove the email and site UrL from my correspondence. I added the plugin code to Post bin where you can take a look. Pastebin
I figured out the solution. I had to call
add_filter( ‘wp_mail_content_type’, ‘notification_content_type’ );
in each individual email function:
add_filter( 'wp_mail', 'dirty_wp_mail_filter' );
function dirty_wp_mail_filter( $args ) {
// you can include your custom html mail template here
// just use file_get_contents() functions to get template file and any php replace function like
// str_ireplace or preg_replace to replace your given placeholder in template by the content which is sent by wp
$stripped_mail_content = preg_replace("/<http(.*)>/m", "http$1", $args['message']);
add_filter( 'wp_mail_content_type', 'dirty_notification_content_type' );
$dirty_wp_mail = array(
'to' => $args['to'],
'subject' => $args['subject'],
'message' => $stripped_mail_content,
'headers' => $args['headers'],
'attachments' => $args['attachments']
);
return $dirty_wp_mail;
}
function dirty_notification_content_type() {
return 'text/html';
}
found here:
core.trac.wordpress.org/ticket/21095