do_action_ref_array( 'phpmailer_init', PHPMailer $phpmailer )

Fires after PHPMailer is initialized.


Description Description


Parameters Parameters

$phpmailer

(PHPMailer) The PHPMailer instance (passed by reference).


Top ↑

Source Source

File: wp-includes/pluggable.php

View on Trac


Top ↑

Changelog Changelog

Changelog
Version Description
2.2.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by Ian Dunn

    If you call $phpmailer->setFrom(), it’s often important to explicitly set the third parameter to false, to tell PHPMailer to not override the Sender header. The parameter defaults to true, and using that can cause messages to be rejected.

    See #37736 for details.

You must log in before being able to contribute a note or feedback.