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

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


$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            = '';

Image Credits: Photo by Isis França on Unsplash.

More Similar Posts

No results found.