Skip to content

BUG: SendCalendarReply ignores Write errors on alt/attach parts #1128

@andrinoff

Description

@andrinoff

Describe the bug

sender/sender.go:802-828 writes the text/plain, text/calendar, and .ics attachment parts via direct .Write calls on the multipart writers, but the returned errors are discarded:

qp := quotedprintable.NewWriter(plainPart)
fmt.Fprint(qp, plainBody)
qp.Close()
...
calPart.Write([]byte(clib.WrapBase64(...)))
...
attachPart.Write([]byte(clib.WrapBase64(...)))

A short write or buffer error here produces a malformed iMIP reply that Google Calendar / Outlook silently reject without RSVP being recorded.

Expected behavior

Capture the errors from each Write/Close and return early if any fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions