function set_contenttype($content_type){
return 'text/html';
}
add_filter('wp_mail_content_type','set_contenttype');
if ( $message && !wp_mail($user_email, $title, nl2br($message), $headers) )
You should set the mail content type as “text/html”.
Related Posts:
- Send user activation email when programmatically creating user
- Writing a plugin that notify my friends of new post that mentions(@) them
- wp_mail not recognizing cc and bcc headers
- WordPress is automatically linking plain text email addresses
- How can I pass get_the_author_meta(‘user_email’) through the REST API?
- wp_mail() headers multipart/alternative
- Warning: include(): https:// wrapper is disabled in the server configuration by allow_url_include=0
- How to get custom post_author?
- What is the way to hook all wordpress email
- Serial Number from custom table not appear in woocommerce_email_before_order_table action
- wp_new_user_notifications to notify user and admin about new user registration
- Using wp_mail to send email?
- How to show comments from different Plugins to same post type?
- How to check if `comment_meta` exists before inserting the comment?
- How to get the `comment_post_ID`?
- Email content as comment
- WordPress mails being sent from @locahost and being rejected
- How Do I Use jQuery UI In My Plugin
- Checking if a file is already in the Media Library
- How to implement add_image_size in a plugin
- Add Custom User Capabilities Before or After the Custom User Role has Been Added?
- How to make dynamically-generated content searchable in WordPress?
- Nav Menu meta failing to import
- How can I track active users of my plugin? and why doesn’t WordPress.Org offer this?
- Custom Rewriting to Plugin with Parameters
- ERROR: Options page not found – saving settings page with tabs
- The plugin generated 80 characters of unexpected output!
- Script won’t load via plugin class
- What’s the Right Way to get and save remote data for a Gutenberg block?
- How to override a function call in functions.php?
- Is there a need to do apply_filter(‘widget_title’, $instance[‘title’]) or any other ‘widget_xxx’ filters?
- Passing array of strings to a SQL statement in a WordPress plugin
- Add multiple shipping rates from add_rate function with custom ID
- Filter, or any way to dynamically change theme screenshot image?
- Sidebar widget to show popular post not working?
- WP_Query returns no results
- On Plugin Activation, How Do I Check for Proper Transport Mechanism?
- Show add_meta_box by selecting a specific category
- How to render a time-of-day string like ’16:42′ with a site’s chosen time format?
- Are block templates incompatible with serialize_blocks?
- Will setcookie work if there is a cache plugin installed?
- Adding settings link to plugin doesn’t work
- Check Paypal Purchase is Success or Not in Easy Digital Download Plugin
- Render content after post title in wp-admin
- Dashboard – get status and position of metaboxes and pass them to ajax method
- Is it possible to install a theme via a plugin?
- Form doesnt save to database
- Wp_list_table search box not working for custom value from database
- Notice: Trying to get property ‘term_id’ of non-object
- javascript datatables in a plugin
- How to add user details to different tables immediately after user registration
- How to change the column label in screen options for a custom column?
- Including comments meta box on a plugin page
- include php file if page_id matches
- Optimising a big WordPress site
- Why wp_die() doesn’t work with wp_redirect but exit() works
- Is it possible to abort post update if specific conditions on metadata are met?
- Remove entire [$key] from array stored in custom field using Ajax – unset($array[$key]); not working
- Category select options for plugin settings
- Bypass product key [closed]
- Return conditional category in load_posts_by_ajax
- How to format custom fields when editing an attachment?
- Woocommerce – Provide Associated Category Link for Product List Plugin [closed]
- How can I call wp-load.php in my plugin file
- How to create new content type and flushes rewrite rules without visiting the permalinks page?
- About a programming language starts with [closed]
- Plugin Development: Storing and Manipulating Data That Fits JSON in Database
- How to set a header in wp_safe_remote_get()?
- How to Get Last ID?
- Custom Block Not Shown in Block Inserter
- How to display specific data from a custom table to logged in users with a custom role
- add_filter postbox_classes multiple post types
- How to add quick edit on the list of users to edit custom fields?
- How to Run Plugin on Server Without Web Browser
- Impossible to declare box-shadow with wp.customize?
- WP Refused to display ‘URL’ in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’
- Get search result count in plugin
- Unit Testing action hook
- 400 Bad Request and illegal invocation in wp_ajax based on processData set to false or true
- delete category on plugin deactivation wordpress
- Rate limiting ajax requests in WordPress
- Integrate separate web app inside wordpress [closed]
- How to filter an action inside class in MemberPress plugin?
- XMLHttpRequest to open PHP file responds with Missing Page
- PHP includes with AJAX actions
- how to retrieve post_id under woocommerce_add_to_cart_validation hook?
- Define a url for an email confirmation from within a plugin
- WordPress Search Form with Keyword Suggestion
- Custom Post Type and Functions
- WordPress custom plugin developement
- Google does not index data from custom table used for a plugin
- Best practice: What belongs in theme and what in plugin for large eCommerce website
- I can install my plugin in localhost but not in my server
- ouput buffering confusing me!
- What is the Timeline for the Active Version Pie Chart in the Repository?
- Email verification feature in wordpress social login plugin
- append code after the_content not working
- Custom Pin it button is not showing over the image instead it shows as block top_left
- check wp_login into a plugin
- Anyway to prevent admin from seeing other admin’s product?