Fires after PHPMailer is initialized.
$phpmailerPHPMailer
The wp_mail() function relies on the PHPMailer class to send email through PHP’s mail function. The phpmailer_init action hook allows you to hook to the phpmailer object and pass in your own arguments.
This action is initiated with `do_action_ref_array` rather than `do_action`. You still hook to it with `do_action`. However, there are some notable differences:
do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
| Version | Description |
|---|---|
| 2.2.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/phpmailer_init