mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Additional headers
This commit is contained in:
parent
063af295b2
commit
376f91fee2
3 changed files with 21 additions and 4 deletions
|
|
@ -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.'>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue