Okay, I’ve got the following issue. I’m trying to send a mail in HTML format. I made a class that returns an HTML string, and that works great.
When I pass that html-mail as $message in my function, works also. But it will not send as html, but plain text.
Now I’ve tried the following things:
1)
$headers = array('Content-Type: text/html; charset=UTF-8');
wp_mail($to, $subject, $message, $headers);
2)
$headers="MIME-Version: 1.0" . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
3)
$headers="MIME-Version: 1.0" . "\r\n";
$headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
4)
function wpse27856_set_content_type(){
return "text/html";
}
add_filter( 'wp_mail_content_type','wpse27856_set_content_type' );
What else could it be?