From 9362ebeaaf3c2bfb575270986cc34e328a42bacc Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 17 Dec 2019 20:28:24 +0100 Subject: [PATCH] fixed messageid --- lib/mailcannon.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/mailcannon.php b/lib/mailcannon.php index 8a617d0..addea6d 100644 --- a/lib/mailcannon.php +++ b/lib/mailcannon.php @@ -34,7 +34,7 @@ class mailcannon { 'To' => $to, 'Subject' => $subject, 'Return-Path' => $from, - 'Message-ID' => self::generateMessageID().'@'.$domain, + 'Message-ID' => self::generateMessageID($domain), 'Date' => date('r', time()))); $recipients = array( 'To' => $to); @@ -163,12 +163,13 @@ class mailcannon { /** * @see http://www.jwz.org/doc/mid.html */ - public static function generateMessageID() + public static function generateMessageID($domain) { return sprintf( - "<%s.%s>", + "<%s.%s@%s>", base_convert(microtime(), 10, 36), - base_convert(bin2hex(openssl_random_pseudo_bytes(8)), 16, 36) + base_convert(bin2hex(openssl_random_pseudo_bytes(8)), 16, 36), + $domain ); } } \ No newline at end of file