Additional headers

This commit is contained in:
RainLoop Team 2014-07-23 00:12:37 +04:00
parent 063af295b2
commit 376f91fee2
3 changed files with 21 additions and 4 deletions

View file

@ -173,6 +173,8 @@ class MailClient
// \MailSo\Mime\Enumerations\Header::CONTENT_TYPE, // \MailSo\Mime\Enumerations\Header::CONTENT_TYPE,
// \MailSo\Mime\Enumerations\Header::REFERENCES, // \MailSo\Mime\Enumerations\Header::REFERENCES,
// \MailSo\Mime\Enumerations\Header::X_DRAFT_INFO, // \MailSo\Mime\Enumerations\Header::X_DRAFT_INFO,
// \MailSo\Mime\Enumerations\Header::RECEIVED_SPF,
// \MailSo\Mime\Enumerations\Header::AUTHENTICATION_RESULTS,
// ), true); // ), true);
} }
@ -357,7 +359,7 @@ class MailClient
$oBodyStructure = null; $oBodyStructure = null;
$oMessage = false; $oMessage = false;
$aBodyPeekMimeIndexes = array(); $aBodyPeekMimeIndexes = array();
$aSignatureMimeIndexes = array(); $aSignatureMimeIndexes = array();
@ -405,7 +407,7 @@ class MailClient
{ {
$sLine .= '<0.'.((int) $iBodyTextLimit).'>'; $sLine .= '<0.'.((int) $iBodyTextLimit).'>';
} }
$aFetchItems[] = $sLine; $aFetchItems[] = $sLine;
} }
} }

View file

@ -38,6 +38,15 @@ class Header
const SENSITIVITY = 'Sensitivity'; const SENSITIVITY = 'Sensitivity';
const RECEIVED_SPF = 'Received-SPF';
const AUTHENTICATION_RESULTS = 'Authentication-Results';
const X_DKIM_AUTHENTICATION_RESULTS = 'X-DKIM-Authentication-Results';
const DKIM_SIGNATURE = 'DKIM-Signature';
const DOMAINKEY_SIGNATURE = 'DomainKey-Signature';
const X_SPAM_STATUS = 'X-Spam-Status';
const RETURN_RECEIPT_TO = 'Return-Receipt-To'; const RETURN_RECEIPT_TO = 'Return-Receipt-To';
const DISPOSITION_NOTIFICATION_TO = 'Disposition-Notification-To'; const DISPOSITION_NOTIFICATION_TO = 'Disposition-Notification-To';
const X_CONFIRM_READING_TO = 'X-Confirm-Reading-To'; const X_CONFIRM_READING_TO = 'X-Confirm-Reading-To';

View file

@ -502,17 +502,23 @@ class Message
*/ */
private function generateNewMessageId($sHostName = '') private function generateNewMessageId($sHostName = '')
{ {
if (0 === strlen($sHostName)) if (0 === \strlen($sHostName))
{ {
$sHostName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : ''; $sHostName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '';
} }
if (empty($sHostName) && \MailSo\Base\Utils::FunctionExistsAndEnabled('php_uname'))
{
$sHostName = \php_uname('n');
}
if (empty($sHostName)) if (empty($sHostName))
{ {
$sHostName = 'localhost'; $sHostName = 'localhost';
} }
return '<'.md5(rand(100000, 999999).time().$sHostName).'@'.$sHostName.'>'; return '<'.\md5(\rand(100000, 999999).\time().$sHostName.
(\MailSo\Base\Utils::FunctionExistsAndEnabled('getmypid') ? @\getmypid() : '')).'@'.$sHostName.'>';
} }
/** /**