Skip to content

net/mail: ParseAddress: unclear error message #21018

@kevinburke

Description

@kevinburke

When parsing this address:

mail.ParseAddress("Foo (middle) Bar <[email protected]>")

you get the following error:

mail: no angle-addr

That's confusing because an angle-addr is present in the input.

The email address should be formatted with quotes as:

mail.ParseAddress(`"Foo (middle) Bar" <[email protected]>`)

But we could probably be clearer about the error there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions