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

End MIME boundary should be followed by CRLF #580

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joshihirenn
Copy link

@joshihirenn joshihirenn commented Sep 15, 2021

The present code mandates that a CRLF is present after intermediate MIME boundary (that doesn't end with --). This change extends that behaviour for end boundary too (that starts and ends with --).
This is useful for processing some bulk emails that uses a single dash character as a boundary and a line full of dashes is present in the content. Gmail and Outlook are able to process such emails, however JavaMail truncates the email after the sequence of five dash characters are consumed from the line full of dash characters.

Signed-off-by : The author is aware of the terms by which the contribution has been provided to the project.

The present code mandates that a CRLF is present after intermediate MIME boundary (that starts with --). This change extends that behaviour for end boundary too (that starts and ends with --).
This is useful for processing some bulk emails that uses a single dash character as a boundary and a line full of dashes is present in the content. Gmail and Outlook are able to process such emails, however JavaMail truncates the email after the sequence of five dash characters are consumed from the line full of dash characters.
No all messages have epilogue. So an end MIME boundary may be followed by EOF.
Copy link
Contributor

@lukasj lukasj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test (simple junit is fine) for this as well, please?

@joshihirenn
Copy link
Author

Can you add a test (simple junit is fine) for this as well, please?

@joshihirenn joshihirenn reopened this Sep 20, 2021
@joshihirenn
Copy link
Author

Can you add a test (simple junit is fine) for this as well, please?

Sure, I will try to add one.

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

2 participants