How to change the Return-path email address using the PHPMailer class

H

How Can We Help?

Fill the $Sender property with the email address you wish to have as the Return-path 

E.g.

$mail->Sender="[email protected]";

This property can be found on Line 97 in the class.phpmailer.php file 

  /** 
   * Sets the Sender email (Return-Path) of the message.  If not empty, 
   * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. 
   * @var string 
   */ 
  public $Sender            = '';

About the author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me