WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Function Reference/wp mail"

(Move stub to bottom, remove new page created)
(Using Parameter template)
Line 4: Line 4:
   
 
== Parameters ==
 
== Parameters ==
+
{{Parameter|$to|string|The intended recipient(s) of the message.}}
; <tt>$to</tt> : (''string'') The intended recipient(s) of the message
+
{{Parameter|$subject|string|The subject of the message.}}
; <tt>$subject</tt> : (''string'') Subject of message
+
{{Parameter|$message|string|Message content.}}
; <tt>$message</tt> : (''string'') Message content
+
{{Parameter|$headers|string|Mail headers to send with the message (advanced)|optional|''Empty''}}
; <tt>$headers</tt> : (''string'') Mail headers to send with the message
 
   
 
== Usage ==
 
== Usage ==

Revision as of 02:40, 13 January 2008

Description

Sends an email.

Parameters

$to
(string) (required) The intended recipient(s) of the message.
Default: None
$subject
(string) (required) The subject of the message.
Default: None
$message
(string) (required) Message content.
Default: None
$headers
(string) (optional) Mail headers to send with the message (advanced)
Default: Empty

Usage

 <?php wp_mail($to$subject$message$headers ); ?> 

This page is marked as incomplete. You can help Codex by expanding it.