function DrupalPHPMailer::CreateHeader in PHPMailer 6
Same name and namespace in other branches
- 5.2 includes/phpmailer.class.inc \DrupalPHPMailer::CreateHeader()
- 6.2 includes/phpmailer.class.inc \DrupalPHPMailer::CreateHeader()
Assembles message header.
PHPMailer always sets Return-Path to Sender, we want more flexibility.
File
- includes/
phpmailer.inc, line 100
Class
Code
function CreateHeader() {
$old_sender = $this->Sender;
if ($this->ReturnPath != '') {
$this->Sender = $this->ReturnPath;
}
$result = parent::CreateHeader();
// Restore sender for use in MAIL FROM command.
$this->Sender = $old_sender;
return $result;
}