coravel
coravel copied to clipboard
Add support for inline attachments in SmtpMailer
Enhanced the Attachment class by adding a ContentId property to support inline content. Updated SmtpMailer to handle attachments with non-empty ContentId as linked resources, generating RFC-compliant ContentId using MimeKit.Utils.MimeUtils.GenerateMessageId(). Modified the HTML body to reference the correct ContentId. Attachments with empty or whitespace ContentId are added as regular attachments.
Thank you for your contribution! Before submitting this PR, please consider:
- If you are fixing something other than a typo, please always create an issue first. Otherwise, your PR will probably be rejected.
- You have added unit tests which (a) pass and (b) sufficiently cover your changes
Based on feature request #376