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

Split content on CRLF or LF #156

Closed
wants to merge 1 commit into from
Closed

Split content on CRLF or LF #156

wants to merge 1 commit into from

Conversation

rlopzc
Copy link

@rlopzc rlopzc commented Sep 22, 2023

Changes proposed in this pull request

Some emails from newsletters don't comply strictly with the RFC2822. One example is Substack. Substack emails only have LF endings.

This PR allows splitting lines by CRLF or LF.

@bcardarella
Copy link
Member

@andrewtimberlake are you OK with this getting merged?

@andrewtimberlake
Copy link
Collaborator

I have just checked some of the substack emails I receive and they appear to be CRLF.
The CRLF line ending is so fundamental to email that I’m inclined not to accept this.
Both Mail.parse/2 and Mail.Parsers.RFC2822.parse/1 accept a list of lines, so it is possible to always pre-parse the lines before using them if you find yourself in a unique situation like this one.

@rlopzc
Copy link
Author

rlopzc commented Sep 24, 2023

Oh that's right, I mistakenly copied the email and my OS changed the CRLF into LF. Just checked the raw value and you are correct @andrewtimberlake :)

@rlopzc rlopzc closed this Sep 24, 2023
@andrewtimberlake
Copy link
Collaborator

:-) I have made that mistake enough times.

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

Successfully merging this pull request may close these issues.

None yet

3 participants