Il se peut que le type de contenu par défaut de l’e-mail soit text/plain. Vous pouvez changer le type text/plain en text/HTML pour inclure des liens personnalisés, du code, etc. dans l’e-mail.
Instructions : Ajoutez le code suivant au fichier functions.php de votre thème WordPress.
function wps_set_content_type(){ return "text/html"; } add_filter( 'wp_mail_content_type','wps_set_content_type' );
Vous pouvez également profiter de conseils efficaces pour obtenir plus d’abonnés à vos courriels aujourd’hui.
I tried this code. But no use of it. Can you please assist me on this regard?
Usefull Code..
nice
It worked for me in using the email users plugin. I had been losing the html when emailing posts but with this it restored it. Thanks
nice glad to hear it!
Is there a way to do this the other way around? Set content type from HTML to plain?
Just in case anybody else is looking for this answer use the code below instead.
function wps_set_content_type(){
return “text/plain”;
}
add_filter( ‘wp_mail_content_type’,’wps_set_content_type’ );
Allow customers to request real-time information
about your business via text message, while putting your contact information in
the customer’s phone for future reference as well as allow you to capture
customer’s mobile number
I used this code, but then when a user requests to reset his password, then the link in the email that gets sent to the user has no link to click on. do you know what the issue could be?
If you are working off your localhost it may have issues using the mail function, try going via ftp.