Hello @dlali,
Thank you for reaching out to us.
If you are using the SMTP plugin to send emails, then please check if there is an option to send the email in plain text?
Please make sure that you allow HTML through email and disable the sending plain text option from SMTP plugin settings.
Let us know how it goes.
Thread Starter
dlali
(@dlali)
Hi,
There was no option in the other pugin, i also wrote a query to them, waiting for answer.
Anyway, meanwhile i have solved this problem with a filter. If anyone interested (got it from Google search):
// adding support for html emails
add_filter( 'wp_mail_content_type','mycustom_set_content_type' );
function mycustom_set_content_type() {
return "text/html";
}
// also filter the password reset email for compatibility with the HTML format
add_filter( 'retrieve_password_message', 'mycustom_retrieve_password_message', 10, 1 );
function mycustom_retrieve_password_message( $message ) {
$message = str_replace('<','',$message);
$message = str_replace('>','',$message);
$message = str_replace("\n",'<br>',$message);
return $message;
}
Tha password reset email filter may not be necessary, as in the woocommerce email settings it already supports html email for password reset.
Ticket can be closed. Though it would be nice to have a solution without a manual filter.
Hello @dlali,
We are glad that your issue has been resolved.
If you have any questions, please feel free to open a new ticket.
Have a great day ahead.