mirror of
https://github.com/PHPMailer/PHPMailer.git
synced 2024-09-20 10:02:14 +02:00
Merge changes from #101
This commit is contained in:
parent
e16c820e56
commit
4075ba4b6b
@ -479,6 +479,13 @@ class PHPMailer
|
||||
*/
|
||||
protected $CustomHeader = array();
|
||||
|
||||
/**
|
||||
* The most recent Message-ID (including angular brackets).
|
||||
* @type string
|
||||
* @access protected
|
||||
*/
|
||||
protected $lastMessageID = '';
|
||||
|
||||
/**
|
||||
* The message's MIME type.
|
||||
* @type string
|
||||
@ -806,6 +813,18 @@ class PHPMailer
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Message-ID header of the last email.
|
||||
* Technically this is the value from the last time the headers were created,
|
||||
* but it also the message ID of the last sent message except in
|
||||
* pathological cases.
|
||||
* @return string
|
||||
*/
|
||||
public function GetLastMessageID()
|
||||
{
|
||||
return $this->lastMessageID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that a string looks like an email address.
|
||||
* @param string $address The email address to check
|
||||
@ -1606,10 +1625,11 @@ class PHPMailer
|
||||
}
|
||||
|
||||
if ($this->MessageID != '') {
|
||||
$result .= $this->headerLine('Message-ID', $this->MessageID);
|
||||
$this->lastMessageID = $this->MessageID;
|
||||
} else {
|
||||
$result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->serverHostname(), $this->LE);
|
||||
$this->lastMessageID = sprintf("<%s@%s>", $uniq_id, $this->ServerHostname());
|
||||
}
|
||||
$result .= $this->HeaderLine('Message-ID', $this->lastMessageID);
|
||||
$result .= $this->headerLine('X-Priority', $this->Priority);
|
||||
if ($this->XMailer == '') {
|
||||
$result .= $this->headerLine(
|
||||
@ -2914,7 +2934,7 @@ class PHPMailer
|
||||
'avi' => 'video/x-msvideo',
|
||||
'movie' => 'video/x-sgi-movie'
|
||||
);
|
||||
return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)];
|
||||
return (array_key_exists(strtolower($ext), $mimes) ? $mimes[strtolower($ext)]: 'application/octet-stream');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user