Skip to content

BUG: Unchecked qp.Close() errors in sender multipart composition #866

@andrinoff

Description

@andrinoff

Describe the bug

In sender.go (lines 220, 360, 373, 804, 816, 830), multiple Close() calls on quoted-printable writers and multipart writers don't check the returned error. A failed Close() means the MIME part wasn't properly terminated, resulting in malformed emails.

To reproduce

  1. Send an email under memory pressure where write buffers can't flush
  2. Email sends with malformed MIME structure

Expected behavior

All Close() calls should check and propagate errors. Use defer with error capture where appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomersneeds-responseWaiting on issue author replystaleNo activity for extended period

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions