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

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