Skip to content

Commit

Permalink
testing forwardEmail attachments fix 3
Browse files Browse the repository at this point in the history
  • Loading branch information
hrsa committed May 12, 2024
1 parent b035aa7 commit c259c39
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/Mail/ForwardEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ public function attachments(): array
$attachments = [];

foreach ($this->inboundEmail->attachments() as $attachment) {
ray($attachment)->purple();
ray($attachment->getFilename())->label('filename')->purple();
$attachments[] = Attachment::fromData(fn () => $attachment, $attachment->getFilename() ?? 'attachment');
try {
$attachmentFileName = $attachment->getFilename();
$attachments[] = Attachment::fromData(fn() => $attachment, $attachment->getFilename());
} catch (\Exception $e) {
continue;
}
};

return $attachments;
Expand Down

0 comments on commit c259c39

Please sign in to comment.