Skip to content

Allow forcing Content-Transfer-Encoding when encoding a Part #395

Description

@mikecardwell

Part.Encode forces base64 for any non-text content (application/*). This adds an unnecessary base64 encoding to content that the builder of the email may know to already be 7bit-safe: for example PGP/MIME and S/MIME armor. I think we should be able to override this when building an email ourselves. We could add an exported Part.ContentTransferEncoding string. If it is empty, it preserves todays current behaviour, but if it contains one of "7bit", "8bit", "base64" or "quoted-printable", we could force that encoding? Unrecognised values would fall back to auto. Happy to submit a small PR to achieve this if you agree with this and the suggested public interface?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions