Skip to content

BUG: Multi-part email composition doesn't handle nested MIME structures correctly #1001

@andrinoff

Description

@andrinoff

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

  1. Reply to an email that is multipart/mixed with inline images
  2. Add your own attachment
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions