add_filter( 'wp_mail_content_type', function( $content_type ) {
return "text/html";
});
$headers = 'From: My Name <myname@mydomain.com>' . "\r\n";
$html = '<p>The <em>HTML</em> message</p>';
wp_mail( 'me@example.com', 'The subject', $html, $headers );