Skip to content

Conversation

@butschster
Copy link
Member

🎯 Problem

When emails contain inline attachments (like QR codes or logos) without explicit filenames that are referenced using cid:ATTACHMENT_ID in the email body, the SMTP module throws a FileOperationException:

Spiral\Storage\Exception\FileOperationException: Unable to retrieve the mime_type for file at location: 01973a7b-4578-70ad-a65c-0195ad63ba6a/qr@domain.com

This happens because the storage system can't determine the MIME type from a malformed file path when the attachment lacks a proper filename.

🔧 Solution

Implemented a strategy pattern to handle different types of email attachments with appropriate filename generation and processing logic.

@butschster butschster self-assigned this Jul 18, 2025
@butschster butschster added bug Something isn't working module [Smtp] labels Jul 18, 2025
@butschster butschster added this to the 1.0 milestone Jul 18, 2025
@butschster butschster linked an issue Jul 18, 2025 that may be closed by this pull request
@butschster butschster merged commit 6c401a3 into master Jul 19, 2025
7 checks passed
@butschster butschster deleted the issue/281 branch July 19, 2025 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working module [Smtp]

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Email - sending inline DataPart throws an error

2 participants