How to change the Return-path email address using the PHPMailer class?
|
|
|
|
|
Question: How to change the Return-path email address using the PHPMailer class? Answer: Fill the $Sender property with the email address you wish to have as the Return-path eg. $mail->Sender="test@testmail.com"; 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           = '';
|