apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' )
参数
  • (array) $args { Array of the `wp_mail()` arguments. @type string|string[] $to Array or comma-separated list of email addresses to send message. @type string $subject Email subject. @type string $message Message contents. @type string|string[] $headers Additional headers. @type string|string[] $attachments Paths to files to attach. }
    Required:
定义位置
相关勾子
pre_wp_mailwp_mail_fromwp_metawp_titlewp_mail_failed
相关方法
wp_mailwp_metawp_saltis_emailwp_titlewp_is_mobile
引入
2.2.0
弃用
-

wp_mail:这是一个WordPress函数,用于发送电子邮件。它是WordPress提供的简化版本,可以方便地在主题或插件中发送邮件。它使用内置的PHP函数mail来发送电子邮件,并可以通过设置不同的头信息和其他参数来定制邮件。

过滤wp_mail()的参数。

$atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 18:32:58

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: