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.
Defined at:


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 Array filter. The default charset is based on the charset used on the blog. The charset can be set using the Array filter.

Related Functions

wp_meta, wp_salt, is_email, wp_title, wp_is_mobile

Top Google Results

User discussions

wpseek mobile