apply_filters( 'wp_mail_content_type', string $content_type )
Filters the wp_mail() content type.
Parameters
- $content_type
-
(string) Default wp_mail() content type.
More Information
- The default content type for email sent through the wp_mail() function is ‘
text/plain‘ which does not allow using HTML. However, you can use thewp_mail_content_typefilter to change the default content type of the email. - In general, content type is going to be ‘
text/plain‘ as the default, or ‘text/html‘ for HTML email; but other MIME types are possible.
Source
Changelog
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_mail_content_type