Describe the bug
In sender/sender.go, multi-part email composition builds a specific MIME tree structure. Edge cases with nested multipart types may produce invalid emails:
- Reply to multipart/mixed email with inline images and attachments creates deeply nested MIME
- Forward of multipart/alternative with attachment may duplicate content
- PGP-encrypted reply to HTML email has inconsistent part ordering
To reproduce
- Reply to an email that is multipart/mixed with inline images
- Add your own attachment
- Resulting MIME tree may be 4+ levels deep, confusing some mail clients
Expected behavior
Flatten MIME tree where possible. Follow RFC 2046 recommendations for part ordering. Test with common mail clients for compatibility.
Describe the bug
In sender/sender.go, multi-part email composition builds a specific MIME tree structure. Edge cases with nested multipart types may produce invalid emails:
To reproduce
Expected behavior
Flatten MIME tree where possible. Follow RFC 2046 recommendations for part ordering. Test with common mail clients for compatibility.