From 0808c39b58ab8c72b7fce53c4b5a47667c6c0d84 Mon Sep 17 00:00:00 2001 From: Hugo Vink Date: Thu, 5 Sep 2019 11:10:02 +0200 Subject: [PATCH] Possible fix issue #377 fix #377 --- 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 0999815c..a4e5dbaa 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.$partStructure->id); + $attachmentId = sha1($fileName . ($partStructure->ifid ? $partStructure->id : "")); $attachment = new IncomingMailAttachment(); $attachment->id = $attachmentId;