From 9a5f46f747228cf065610595d4473f6257d43ecd Mon Sep 17 00:00:00 2001 From: Mariusz Krzaczkowski Date: Fri, 15 Mar 2024 17:27:41 +0100 Subject: [PATCH] Add cid default domain --- src/PHPMailer.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/PHPMailer.php b/src/PHPMailer.php index 11d57ab5..5ab19007 100644 --- a/src/PHPMailer.php +++ b/src/PHPMailer.php @@ -590,6 +590,13 @@ class PHPMailer */ public static $validator = 'php'; + /** + * cid default domain + * + * @var string + */ + public $cid_default_domain = '@phpmailer.0'; + /** * An instance of the SMTP sender class. * @@ -4625,7 +4632,7 @@ class PHPMailer } //Hash the decoded data, not the URL, so that the same data-URI image used in multiple places //will only be embedded once, even if it used a different encoding - $cid = substr(hash('sha256', $data), 0, 32) . '@phpmailer.0'; //RFC2392 S 2 + $cid = substr(hash('sha256', $data), 0, 32) . $this->cid_default_domain; //RFC2392 S 2 if (!$this->cidExists($cid)) { $this->addStringEmbeddedImage( @@ -4659,7 +4666,7 @@ class PHPMailer $directory = ''; } //RFC2392 S 2 - $cid = substr(hash('sha256', $url), 0, 32) . '@phpmailer.0'; + $cid = substr(hash('sha256', $url), 0, 32) . $this->cid_default_domain; if (strlen($basedir) > 1 && '/' !== substr($basedir, -1)) { $basedir .= '/'; }