|
|
@ -531,6 +531,7 @@ function hesk_mail($to, $subject, $message, $htmlMessage, $modsForHesk_settings,
|
|
|
|
$headers .= "Reply-To: $hesk_settings[from_header]\n";
|
|
|
|
$headers .= "Reply-To: $hesk_settings[from_header]\n";
|
|
|
|
$headers .= "Return-Path: $hesk_settings[webmaster_mail]\n";
|
|
|
|
$headers .= "Return-Path: $hesk_settings[webmaster_mail]\n";
|
|
|
|
$headers .= "Date: " . date(DATE_RFC2822) . "\n";
|
|
|
|
$headers .= "Date: " . date(DATE_RFC2822) . "\n";
|
|
|
|
|
|
|
|
$headers .= "Message-ID: " . hesk_generateMessageID() . "\n";
|
|
|
|
$headers .= "Content-Type: multipart/mixed;boundary=\"" . $outerboundary . "\"";
|
|
|
|
$headers .= "Content-Type: multipart/mixed;boundary=\"" . $outerboundary . "\"";
|
|
|
|
|
|
|
|
|
|
|
|
// Add attachments if necessary
|
|
|
|
// Add attachments if necessary
|
|
|
@ -569,7 +570,8 @@ function hesk_mail($to, $subject, $message, $htmlMessage, $modsForHesk_settings,
|
|
|
|
"Reply-To: $hesk_settings[from_header]",
|
|
|
|
"Reply-To: $hesk_settings[from_header]",
|
|
|
|
"Return-Path: $hesk_settings[webmaster_mail]",
|
|
|
|
"Return-Path: $hesk_settings[webmaster_mail]",
|
|
|
|
"Subject: " . $subject,
|
|
|
|
"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, "MIME-Version: 1.0");
|
|
|
|
array_push($headersArray, "Content-Type: multipart/mixed;boundary=\"" . $outerboundary . "\"");
|
|
|
|
array_push($headersArray, "Content-Type: multipart/mixed;boundary=\"" . $outerboundary . "\"");
|
|
|
@ -1000,3 +1002,13 @@ function checkForHtml($ticket) {
|
|
|
|
$reply = hesk_dbFetchAssoc($repliesRs);
|
|
|
|
$reply = hesk_dbFetchAssoc($repliesRs);
|
|
|
|
return $reply['html'];
|
|
|
|
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()
|
|
|
|