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()的引數。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );
$atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );
$atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );

常見問題

FAQs
檢視更多 >