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

Fix produced text address list string according to rfc 2822 #340

Merged
merged 1 commit into from Jan 4, 2024

Conversation

neemah
Copy link
Contributor

@neemah neemah commented Mar 9, 2023

A.1.2. Different types of mailboxes

This message includes multiple addresses in the destination fields
and also uses several different forms of addresses.


From: "Joe Q. Public" john.q.public@example.com
To: Mary Smith mary@x.test, jdoe@example.org, Who? one@y.test
Cc: boss@nil.test, "Giant; "Big" Box" sysservices@example.net
Date: Tue, 1 Jul 2003 10:52:37 +0200
Message-ID: 5678.21-Nov-1997@example.com

Hi everyone.

Note that the display names for Joe Q. Public and Giant; "Big" Box
needed to be enclosed in double-quotes because the former contains
the period and the latter contains both semicolon and double-quote
characters (the double-quote characters appearing as quoted-pair
construct). Conversely, the display name for Who? could appear
without them because the question mark is legal in an atom. Notice
also that jdoe@example.org and boss@nil.test have no display names
associated with them at all, and jdoe@example.org uses the simpler
address form without the angle brackets.

Another try to fix text string generation :-)

@CLAassistant
Copy link

CLAassistant commented Mar 9, 2023

CLA assistant check
All committers have signed the CLA.

@neemah
Copy link
Contributor Author

neemah commented Mar 9, 2023

It is not required for any email address, only for certain cases, if you agree - I can make better code that will add quotes only if they are needed.

@andris9 andris9 merged commit 6bae600 into nodemailer:master Jan 4, 2024
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