Use this example:
add_filter( 'wp_mail_content_type', 'set_html_content_type' );
wp_mail( $mails_to, 'The subject', '<p>The <em>HTML</em> message</p>' );
// Reset content-type to avoid conflicts -- http://core.trac.wordpress.org/ticket/23578
remove_filter( 'wp_mail_content_type', 'set_html_content_type' );
function set_html_content_type() {
return 'text/html';
}
Related Posts:
- 3 different mail notifications
- Conditional wp_mail statement on post
- How to set SMTP programmatically
- Does WordPress have a built in message function for presenting notifications to users?
- WordPress “phpmailer_init” not working for me
- How to use PHPmailer in a function in WordPress
- How to set up gmail SMTP in WordPress
- Remove Update Notification (for all users except ADMIN)
- Show Admin Message on Redirect
- Should I use wp_mail or PHP’s mail? [duplicate]
- If new comment posted in custom post – send notification to custom email from custom field
- How to setup SMTP for only one specific wp_mail()
- User invite email not delivered – related to subdomain?
- How to send notifications without a plugin when a post is updated in WordPress?
- Why wp_mail() function isn’t sending any emails and displaying ‘0’ in Chrome ‘Network’ response
- How Can I Change Default Reply ToEmail
- Redirect to another page after submission using wp_mail
- WP mail sent to MS Exchange recipients = occasional email corruption?
- Email has been changed notifications
- How best to display notifications on the front-end using caught exceptions as an example
- Send notification to the admin when new custom post is submitted
- Emailing passwords: Setup installed on home server using XAMPP
- What are the pros and cons to a WordPress run newsletter v. third party newsletter? [closed]
- REST alert when new WordPress post is published or updated
- wp_mail not sending emails
- What is the most efficient way of implementing a notification system? [closed]
- How dynamically change wp_mail behaviour, sending html or plain text based on conditions?
- Can I show a custom message to a specific user?
- send new post notification to an email address stored in a custom field value
- Removing sensitive information from comment notifications – notify_post_author
- Notification when certain posts are published
- WordPress doesn’t work properly with non standard domain names – PHPMailer fails when initialising
- How to display Real-Time notifications (via Icons) in WordPress
- How to send automatic response after form submission without plugin
- WordPress, Mailchimp, Campaigns – should separate campaigns be used for something like notifying users of drip content?
- How can admins to be notified of changes when users change their WP profiles?
- WordPress wp_mail function crashing website
- New user notification issue
- phpmailer_init ignored on REST calls
- Notification on getting an email from an user
- Multisite – SMTP not working on other network sites
- wp mail smtp earlier version
- How to prevent comment moderation flood?
- How to make mailing queue using php’s mail() function
- Looking for plugins that notify users of comment replies [closed]
- Send and receive emails with wp_mail() for WP User (like Mailserver)
- File attachment with PHPMailer
- php_network_getaddresses: getaddrinfo failed: Name or service not known (0) Failed To Connect..!
- How to send to BCC address when using PHPMailer to format MIME message for Gmail API?
- PhpMailer SMTP NOTICE: EOF caught while checking if connected
- PhpMailer SMTP NOTICE: EOF caught while checking if connected
- How to hide popping up Google Play’s unlocked achievement programatically?
- Send both HTML and Plain Text emails using wp_mail in wordpress
- Is there a way to send HTML formatted emails with WordPress’ wp_mail() function?
- Disable update notification for individual plugins
- Sending multipart (text/html) emails via wp_mail() will likely get your domain banned
- Why won’t wp_mail() let me set the From: header when plain old PHP mail() will?
- Page returns 404 with POST variables, but not without
- What is the advantage of using wp_mail?
- Disable email notification after change of password
- Using wp_mail with attachments but no attachments received
- WordPress refuses to send mail, “…your host may have disabled the mail() function”
- Alert Email when any Post or Page is Changed
- Do something after sending email
- Enable update notification, disable updates
- Add update notification bubble to admin menu item?
- Using wp_schedule_single_event with arguments to send email
- How to add headers to outgoing email?
- Why “Contact Form 7” doesn’t update PHPmailer library?
- How to disable the “Your site has updated to WordPress x.y.z” admin email?
- How to change the email notification recipient (user) for new comments?
- How to send an email using wp_mail and using more than one BCC in the header
- wp_mail and BCC headers
- Disable WP core updates but send email notification
- New post notification in wp_nav_menu
- Pluggable function and activation check?
- Check to check if wp_mail is working properly?
- how to set from address according to the form input email address for wp_mail()?
- Multiple email recipient using wp_mail()
- Unable to prevent function using save_post firing twice
- Overriding the default WP Multisite notification e-mail
- Customizing the Subject Field in WordPress’ Notification Emails?
- Disable new user notification to admin email
- Using WordPress templating for HTML emails
- Send email when a new post is published [closed]
- How do I override the Message-ID header of wp_mail function?
- Send attachments via wp_mail from temporary folder
- Showing WP_Error message with admin_notice action hook
- wp_mail script with jQuery post
- wp_mail is undefined
- How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?
- How to apply the “retrieve_password_message” filter?
- How to count number of functions attached to an action hook?
- How to add notification bubble for my custom admin menu page
- wp_mail – Remove sitename from email subject
- Fatal error: Call to undefined function wp_mail()
- Disabling Comment Notifications for Post Author
- Adding an Attachment to Contact Form Using wp_mail
- Different wp_mail_from and wp_mail_from_name for specific situations
- Using wp_mail() – verify that email was sent?