Skip to content

net/mail: ReadMessage fails with messages that have an empty body #24256

@hbbio

Description

@hbbio

What version of Go are you using (go version)?

1.10

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

Could do, but not relevant

What did you do?

Parsing emails from Apple Mail with net/mail.ReadMessage fails with EOF. Indeed some emails (typically: Calendar invites) have no body. This might violate the spec, but still is common.

What did you expect to see?

As described in #15632, ReadMessage should accept a missing body.

What did you see instead?

Returns error EOF.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions