wphooks.info - phpmailer_init

phpmailer_init

(trunk - 5.0-alpha-42993)

The hook occurs in the following file:

wp-includes/pluggable.php:
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
			}
		}

		/**
		 * Fires after PHPMailer is initialized.
		 *
		 * @since 2.2.0
		 *
		 * @param PHPMailer $phpmailer The PHPMailer instance (passed by reference).
		 */
		do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );

		// Send!
		try {
			return $phpmailer->send();
		} catch ( phpmailerException $e ) {

			$mail_error_data                             = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
			$mail_error_data['phpmailer_exception_code'] = $e->getCode();