From 64e91cc9b8e040011f4733b9d98695e9668df676 Mon Sep 17 00:00:00 2001 From: barbushin Date: Fri, 10 Nov 2017 11:09:41 +0800 Subject: [PATCH] Fix internal attachment links closes #204 --- src/PhpImap/IncomingMail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpImap/IncomingMail.php b/src/PhpImap/IncomingMail.php index a2a57cdb..02f2106c 100644 --- a/src/PhpImap/IncomingMail.php +++ b/src/PhpImap/IncomingMail.php @@ -46,7 +46,7 @@ public function replaceInternalLinks($baseUri) { foreach($this->attachments as $attachment) { if($attachment->contentId == $attachmentId) { $search[] = $placeholder; - $replace[] = $baseUri . basename($this->attachments[$attachmentId]->filePath); + $replace[] = $baseUri . basename($this->attachments[$attachment->id]->filePath); } } }