写 wp_mail 没有标头可以吗?
该函数的用法是
<?php wp_mail( $to, $subject, $message, $headers, $attachments ); ?>
问:我可以这样使用吗? <?php wp_mail( $to, $subject, $message); ?>
是的,您可以使用它:
<?php wp_mail( $to, $subject, $message); ?>
$headers 和 $attachments 默认为空(它们是可选的)。
是的,如果您检查参数下方的文本,则$headers
说明其(string or array) (optional)
$to
(string or array) (required) The intended recipient(s). Multiple recipients may be specified using an array or a comma-separated string.
Default: None
$subject
(string) (required) The subject of the message.
Default: None
$message
(string) (required) Message content.
Default: None
$headers
(string or array) (optional) Mail headers to send with the message. (advanced)
Default: Empty
$attachments
(string or array) (optional) Files to attach: a single filename, an array of filenames, or a newline-delimited string list of multiple filenames. (advanced)
Default: Empty
来源:http ://codex.wordpress.org/Function_Reference/wp_mail#Parameters
是的,你可以这样使用
<?php wp_mail( $to, $subject, $message); ?>
$headers 是一个可选参数