mail: notice if malformed mail is corrected

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3737 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-05-30 13:45:50 +00:00
parent 683d5b0a51
commit d70014ad3e

View File

@@ -361,9 +361,13 @@ class mail
}
if ($prev !== "")
{
list ($head, $value) = explode (": ", $prev, 2);
$value .= $prevCR;
$headersArray[][$head] = $value;
$exp = explode (": ", $prev, 2);
if (array_key_exists (1, $exp))
{
list ($head, $value) = $exp;
$value .= $prevCR;
$headersArray[][$head] = $value;
}
}
}
$contentType = $this->getHeaderValue ("Content-Type", $headersArray);
@@ -1341,7 +1345,7 @@ class mail
/** Create a messageID
* @return string the textual MessageID
*/
private function getMessageID ()
public function getMessageID ()
{
$data = openssl_random_pseudo_bytes (16);
$data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0010