Skip to content

Commit

Permalink
Merge pull request #654 from barbushin/585-Avoid-fetching-attachments…
Browse files Browse the repository at this point in the history
…-when-already-downloaded

#585: Avoid fetching attachments when they are already downloaded
  • Loading branch information
Sebbo94BY authored Jan 8, 2022
2 parents 8a7de45 + d227aec commit a572a21
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PhpImap/DataPartInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ public function fetch(): string
if (0 === $this->part) {
$this->data = Imap::body($this->mail->getImapStream(), $this->id, $this->options);
} else {
if (null !== $this->data) {
return $this->data;
}
$this->data = Imap::fetchbody($this->mail->getImapStream(), $this->id, $this->part, $this->options);
}

Expand Down

0 comments on commit a572a21

Please sign in to comment.