Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support format=flowed? #5

Open
alexwennerberg opened this issue Mar 20, 2022 · 3 comments
Open

support format=flowed? #5

alexwennerberg opened this issue Mar 20, 2022 · 3 comments

Comments

@alexwennerberg
Copy link

  1. I'm not sure whether this library should assume that a trailing space means that it should use quoted-printable instead of utf-7 -- what's the reasoning behind this?
  2. It would be nice to have a way to set format=flowed -- I put together some commits on https://github.com/alexwennerberg/mail-builder but I'm not sure if it's the best way to do it or something you want to support in this library
@mdecimus
Copy link
Member

That is done to preserve the integrity of the message. According to RFC2045 section 6.7:

      [...] some MTAs (Message Transport Agents,
      programs which transport messages from one user to
      another, or perform a portion of such transfers) are
      known to pad lines of text with SPACEs, and others are
      known to remove "white space" characters from the end
      of a line.  [...]

@alexwennerberg
Copy link
Author

@mdecimus

That's true, but the spec also says quoted-printable shouldn't be used for this purpose

https://www.ietf.org/rfc/rfc2646.html#section-4.1

[Quoted-Printable] encoding SHOULD NOT be used with Format=Flowed unless absolutely necessary (for example, non-US-ASCII (8-bit) characters over a strictly 7-bit transport such as unextended SMTP). In particular, a message SHOULD NOT be encoded in Quoted-Printable for the sole purpose of protecting the trailing space on flowed lines unless the body part is cryptographically signed or encrypted (see Section 4.6).

It also appears in section 6.7 that white space stripping/adding is rare (and this was written in 1999) and degrades gracefully to non-flowed plaintext. Anecdotally, I see 7-bit-encoded format=flowed emails in my inbox

@mdecimus
Copy link
Member

@alexwennerberg I'll keep this issue (as well the other two) open and as soon as I have some time I'll see how this can be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants