wp_mail ( $to, $subject, $message, $headers = '', $attachments = array() )
- (string|array) to Array or comma-separated list of email addresses to send message.
- (string) subject Email subject
- (string) message Message contents
- (string|array) headers Optional. Additional headers.
- (string|array) attachments Optional. Files to attach.
- (bool) Whether the email contents were sent successfully.
- Introduced in WordPress: 1.2.1
- Deprecated in WordPress: —
Sends an email, similar to PHP's mail function.A true return value does not automatically mean that the user received the
email successfully. It just only means that the method used was able to
process the request without any errors.
The default content type is `text/plain` which does not allow using HTML.
However, you can set the content type of the email by using the
The default charset is based on the charset used on the blog. The charset can
be set using the Array filter.