diff --git a/class.phpmailer.php b/class.phpmailer.php index ce15e725..40d7ff5c 100644 --- a/class.phpmailer.php +++ b/class.phpmailer.php @@ -1384,11 +1384,11 @@ class PHPMailer { } if ($this->ReturnPath) { - $result .= $this->HeaderLine('Return-Path', trim($this->ReturnPath)); + $result .= $this->HeaderLine('Return-Path', '<'.trim($this->ReturnPath).'>'); } elseif ($this->Sender == '') { - $result .= $this->HeaderLine('Return-Path', trim($this->From)); + $result .= $this->HeaderLine('Return-Path', '<'.trim($this->From).'>'); } else { - $result .= $this->HeaderLine('Return-Path', trim($this->Sender)); + $result .= $this->HeaderLine('Return-Path', '<'.trim($this->Sender).'>'); } // To be created automatically by mail()