Skip to content

Commit

Permalink
Added Message-ID in SMTP library as per MB
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed Sep 5, 2024
1 parent 075422d commit d6d8c23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions upload/system/library/mail/smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public function send(): bool {
$header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->option['reply_to']) . '?= <' . $this->option['reply_to'] . '>' . PHP_EOL;
}

$header .= 'Message-ID: <' . base_convert(str_replace(['.', ' '], '', microtime()), 10, 36) . '.' . base_convert(bin2hex(openssl_random_pseudo_bytes(8)), 16, 36) . substr($this->option['from'], strrpos($this->option['from'], '@')) . '>' . PHP_EOL;
$header .= 'Return-Path: ' . $this->option['from'] . PHP_EOL;
$header .= 'X-Mailer: PHP/' . PHP_VERSION . PHP_EOL;
$header .= 'Content-Type: multipart/mixed; boundary="' . $boundary . '"' . PHP_EOL . PHP_EOL;
Expand Down

0 comments on commit d6d8c23

Please sign in to comment.