WordPress new user email formatting issues
I have a WordPress site where i have Issue with the email, that user receives after creating an account.
Email that a user receives, looks like this: https://tinyurl.com/y45bgy5z
There is no formatting, no paragraph or no line breaks etc in the email. I have tried fixing this by adding filter for wp_new_user_notification_email but it did not worked: I have tried fixing it by using following:
add_filter('wp_new_user_notification_email', 'tpkcs_welcome_email', 10, 3);
function tpkcs_welcome_email($wp_new_user_notification_email, $user, $blogname)
{
$wp_new_user_notification_email['headers'] = 'Content-Type: text/html; charset=UTF-8';
return $wp_new_user_notification_email;
}
I have also tried this:
// Add content Type to emial template
function kcss_set_content_type(){
return text/html;
}
add_filter( 'wp_mail_content_type','kcss_set_content_type' );
But none of the filters/actions worked either.
Topic html-email email Wordpress
Category Web