Skip to content

proposal: net/mail: provide Address.String() alternative which only converts to RFC 5322 and does not encode as RFC 2047 #27908

@epelc

Description

@epelc

The Address.String() method sometimes encodes as RFC 2047 after the 5322 formatting depending on the characters in the address. However some services (Ala sparkpost transmission api header fields) want RFC 5322 formatted addresses in UTF8 and not encoded as RFC 2047.

I'm not sure if the [quoting](
I don't think you can easily or safely reverse the 2047 encoding via the mime package because the code has two paths for quoting.
I think you'd want a String() method which basically returned before this.) is a part of rfc 2047 or not.

I know this isn't required to the use the api but I'm wondering if there are any other use case which wouldn't require RFC 2047 encoding as well. If so it might be worthwhile to add an additional string/format function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.Proposal

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions