wp_mail_succeeded

動作鉤子
do_action( 'wp_mail_succeeded', $mail_data )
引數
  • (array) $mail_data { An array containing the email recipient(s), subject, message, headers, and attachments. @type string[] $to Email addresses to send message. @type string $subject Email subject. @type string $message Message contents. @type string[] $headers Additional headers. @type string[] $attachments Paths to files to attach. }
    Required:
定義位置
相關勾子
wp_mail_failedwp_mail_charsetwp_mail_content_typewp_mailwp_mail_from
相關方法
wp_next_scheduledwp_mailwp_handle_sideloadwp_audio_shortcodewp_get_schedulewp_clear_scheduled_hook
引入
5.9.0
棄用
-

wp_mail_succeeded: 這是一個 WordPress 的鉤子,它在電子郵件傳送成功後觸發。您可以通過這個鉤子執行自己的程式碼,以便檢查郵件是否成功傳送並執行任何其他所需的操作。

在PHPMailer成功傳送了一封郵件後觸發。

這個動作的啟動不一定意味著收件人成功收到了郵件。它只意味著上面的send方法能夠處理請求而沒有任何錯誤。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'wp_mail_succeeded', $mail_data );
do_action( 'wp_mail_succeeded', $mail_data );
do_action( 'wp_mail_succeeded', $mail_data );

常見問題

FAQs
檢視更多 >