This is the hook in source/core, but i couldn´t get around it. If you solve it, pls post back your sollution. Thanks!
Hi Guys
There is the filter for content type though I have never got it to work or find anyone who has got it to work. Instead the the trick is to build a custom header with the MIME, Content Type. Below is an example.
$headers= "MIME-Version: 1.0\n" .
"From: Me <dale.hurley@example.com>\n" .
"Content-Type: text/html; charset=\"" .
get_option('blog_charset') . "\"\n";
wp_mail($emailaddress, $subject, $content, $headers);
Dale
CreateMy.com.au
I know this is a little late, but it could be useful
before you send your wp_mail call add a filter to wp_mail_content_type
add_filter('wp_mail_content_type','set_contenttype');
then in your set_contenttype function have it return the appropriate content type, in this case ‘text/html’
function set_contenttype($content_type){
return 'text/html';
}
works for me
Same end-result, but less code:
<?php
add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
wp_mail('whoever@whatever.com', 'Subject', 'Message');
?>
Andy, very helpful, thank you