do_action_ref_array( 'phpmailer_init', PHPMailer $phpmailer )
Fires after PHPMailer is initialized.
Description
Parameters
- $phpmailer
-
(PHPMailer) The PHPMailer instance (passed by reference).
Source
Changelog
Version | Description |
---|---|
2.2.0 | Introduced. |
If you call
$phpmailer->setFrom()
, it’s often important to explicitly set the third parameter tofalse
, to tell PHPMailer to not override theSender
header. The parameter defaults totrue
, and using that can cause messages to be rejected.See #37736 for details.