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]
- What is the advantage of using wp_mail?
- Disable email notification after change of password
- Disable new user notification to admin email
- How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?
- Fatal error: Call to undefined function wp_mail()
- Mail will not send in HTML
- Notify admin when page is edited?
- How can I edit the email sent when a new comment is received?
- How to notify users of blog updates a la Admin Plugin Update notifications?
- wp_mail recipient array not sending?
- Change Default wp_mail From, Without Affecting Gravity Forms
- An old plugin self-made stoped sending mail
- How to create a CSV on the fly and send as an attachment using wp_mail?
- Disable WP notifications for commenting on own posts
- Must I change the admin user email address while changing the general email address?
- admin_notices not displaying in plugin
- Notification to Admin or Author upon new post [duplicate]
- Setting Custom Email From name and email address in wp_email()
- Getting admin notices working for plugin errors
- Tag subscription option in wordpress. How?
- Mechanism to send to users of secured WordPress install new notifications by SMS or email?
- how to send an email with wp_mail with an image on the email body
- How to make a stand-alone button to the post edit view
- wp_mail() not sending email in multisite subdomain
- Prevent scheduled post being published if date/time is past current date/time
- Google Apps SMTP for WP MultiSite?
- wp_mail sending old content from post
- Modify wp_installed_email / wp_new_blog_notification
- Send a review notification email to admin when a post is 12 months old
- Getting admin notices to appear after page refresh
- How to send language string in email message body
- wp_mail – using a custom field value for $to
- Sending HTML email containing custom fields to site users from WordPress
- Create mail form using PHPmailer
- How to send a BuddyPress user a notification on a plugin event? [closed]
- How to customize maintenance mode notification in wordpress?
- How to disable activation email to specific user role?
- Using wp_mail to send email?
- Using SMTP Function instead of Plugin (functions.php)
- Updated : how to make email optional while user registration using default wordpress form
- How to send a particular csv file as an email?
- Email post to submitter
- Send data URL string as an attachment in wp_email
- WP_mail() Issue. Duplicate emails if $_GET[‘A’] == email
- How to use Contact Form 7 to handle the server side mail() only?
- Wp_mail doesnt work
- Displaying errors on the front end from my plugin
- Which hook to use to add notification message at beginning of my
- Custom Contact Form Not Sending (but not giving error)
- User profile update author
- Subscribe to a post’s comments without posting a comment yourself
- Trying to disable all notifications except for one on woocommerce checkout page with css [closed]
- WordPress is not sending the 2nd email in the same request
- wp_mail vs mail functions and header arrays
- Call API on post save/update and show the result in admin area