From c09a23ca1de906c5520eda1afd83437f86734cc2 Mon Sep 17 00:00:00 2001 From: Dmitry Krokhin Date: Sat, 31 Aug 2019 14:43:33 +0300 Subject: [PATCH] ContentId based attachment key calculation --- src/PhpImap/Mailbox.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpImap/Mailbox.php b/src/PhpImap/Mailbox.php index 3a318e5b..0999815c 100644 --- a/src/PhpImap/Mailbox.php +++ b/src/PhpImap/Mailbox.php @@ -1093,7 +1093,7 @@ public function downloadAttachment($dataInfo, $params, $partStructure, $mailId, $fileName = $fileName; } - $attachmentId = sha1($fileName); + $attachmentId = sha1($fileName.$partStructure->id); $attachment = new IncomingMailAttachment(); $attachment->id = $attachmentId;