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

Encoded Subject too long #53

Open
falco467 opened this issue Oct 24, 2023 · 2 comments
Open

Encoded Subject too long #53

falco467 opened this issue Oct 24, 2023 · 2 comments

Comments

@falco467
Copy link

According to RFC 2047 an encoded word cannot be longer than 76 characters (including everything). So a longer subject line should be split and encoded into multiple encoded words.

Using the library mgs.setSubject('x'.repeat(100)) results in a single standard breaking encoded word. This leads to some Mail-Servers rejecting this message with an error.

The encoding should split and wrap longer encoded words to match the standard.

@muratgozel
Copy link
Owner

hi @falco467 maybe we should add a strict (or loose) mode to trim subjects longer than 76 chars. im leaving this issue open to see how it goes.

@falco467
Copy link
Author

As far as I can see, all compliant clients will perform the line break after 76 characters. And I haven't seen any email client in the wild which doesn't parse the soft line breaks correctly. I don't think you necessarily need a "loose" mode to recreate the broken non-standard-compliant behavior.

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