wphooks.info - phpmailer_init

phpmailer_init

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/pluggable.php:
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
		}
	}

	/**
	 * 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();