HESK 2.8.1 update
This commit is contained in:
parent
a1fcc93f4e
commit
c133b11bf6
@ -531,6 +531,7 @@ function hesk_mail($to, $subject, $message, $htmlMessage, $modsForHesk_settings,
|
||||
$headers .= "Reply-To: $hesk_settings[from_header]\n";
|
||||
$headers .= "Return-Path: $hesk_settings[webmaster_mail]\n";
|
||||
$headers .= "Date: " . date(DATE_RFC2822) . "\n";
|
||||
$headers .= "Message-ID: " . hesk_generateMessageID() . "\n";
|
||||
$headers .= "Content-Type: multipart/mixed;boundary=\"" . $outerboundary . "\"";
|
||||
|
||||
// Add attachments if necessary
|
||||
@ -569,7 +570,8 @@ function hesk_mail($to, $subject, $message, $htmlMessage, $modsForHesk_settings,
|
||||
"Reply-To: $hesk_settings[from_header]",
|
||||
"Return-Path: $hesk_settings[webmaster_mail]",
|
||||
"Subject: " . $subject,
|
||||
"Date: " . date(DATE_RFC2822)
|
||||
"Date: " . date(DATE_RFC2822),
|
||||
"Message-ID: " . hesk_generateMessageID() . "\n",
|
||||
);
|
||||
array_push($headersArray, "MIME-Version: 1.0");
|
||||
array_push($headersArray, "Content-Type: multipart/mixed;boundary=\"" . $outerboundary . "\"");
|
||||
@ -1000,3 +1002,13 @@ function checkForHtml($ticket) {
|
||||
$reply = hesk_dbFetchAssoc($repliesRs);
|
||||
return $reply['html'];
|
||||
}
|
||||
|
||||
function hesk_generateMessageID() {
|
||||
if (function_exists('openssl_random_pseudo_bytes')) {
|
||||
$id = base_convert(bin2hex(openssl_random_pseudo_bytes(8)), 16, 36);
|
||||
} else {
|
||||
$id = uniqid('', true);
|
||||
}
|
||||
|
||||
return '<' . $id . '.' . gmdate('YmdHis') . '@' . $_SERVER['SERVER_NAME'] . '>';
|
||||
} // END hesk_generateMessageID()
|
||||
|
Loading…
x
Reference in New Issue
Block a user