phpmailer_init
Fires after PHPMailer is initialized.
Usage
add_action( 'phpmailer_init', 'wp_kama_phpmailer_init_action' ); /** * Function for `phpmailer_init` action-hook. * * @param PHPMailer $phpmailer The PHPMailer instance (passed by reference). * * @return void */ function wp_kama_phpmailer_init_action( $phpmailer ){ // action... }
- $phpmailer(PHPMailer)
- The PHPMailer instance (passed by reference).
Changelog
Since 2.2.0 | Introduced. |
Where the hook is called
phpmailer_init
wp-includes/pluggable.php 540
do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
Where the hook is used in WordPress
wp-includes/ms-default-filters.php 107
add_action( 'phpmailer_init', 'fix_phpmailer_messageid' );