diff --git a/src/Fetch/Attachment.php b/src/Fetch/Attachment.php index e77984a..c9db5e3 100644 --- a/src/Fetch/Attachment.php +++ b/src/Fetch/Attachment.php @@ -98,7 +98,9 @@ public function __construct(Message $message, $structure, $partIdentifier = null $this->setFileName($parameters['name']); } - $this->size = $structure->bytes; + if (isset($structure->bytes)) { + $this->size = $structure->bytes; + } $this->mimeType = Message::typeIdToString($structure->type);