WordPress Development Asked by scooterlord on December 8, 2021
I have been struggling to remove the wpautop
filter from the retrieve_password_message
function. I created a new email message and want to keep my <br>
s instead of having automatic paragraphs added – since most email clients can’t handle well <p>
paddings or margins.
Any help?
Thanks to the constructive conversation with Jacob in the comments, I did some additional tests and realized that the <p>
tags were in fact added by the plugin - testing in ive environment revealed that the email was plain text.
The solution to the problem was to add the following snippet in my functions.php
:
function email_set_content_type(){
return "text/html";
}
add_filter( 'wp_mail_content_type','email_set_content_type' );
Answered by scooterlord on December 8, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP