From ad42b570d8103e8fe0e19c633565c76475d3e19b Mon Sep 17 00:00:00 2001 From: "Jexy.ru" Date: Fri, 2 May 2014 05:36:35 -0700 Subject: [PATCH] Update class.phpmailer.php If MessageDate was not explicitely set before composing message, we get empty value if we need to retrieve date late (i.e. for debug or log purposes). --- class.phpmailer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/class.phpmailer.php b/class.phpmailer.php index bea1367db..e4895b8c1 100644 --- a/class.phpmailer.php +++ b/class.phpmailer.php @@ -1636,10 +1636,10 @@ public function createHeader() $this->boundary[3] = 'b3_' . $uniq_id; if ($this->MessageDate == '') { - $result .= $this->headerLine('Date', self::rfcDate()); - } else { - $result .= $this->headerLine('Date', $this->MessageDate); + $this->MessageDate = self::rfcDate(); } + $result .= $this->headerLine('Date', $this->MessageDate); + // To be created automatically by mail() if ($this->SingleTo === true) {