This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author thehesiod
Recipients barry, r.david.murray, thehesiod
Date 2021-11-29.22:10:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638223840.93.0.45573972976.issue45932@roundup.psfhosted.org>
In-reply-to
Content
If you have a reply-to list that contains a name with a comma it must be quoted, however if the line length is just right python with split the name incorrectly and not keep the quote.  Note that the CC line keeps the quote in the name but the reply-to does not, presumably since the line is slightly longer.

example:
from email.message import EmailMessage


def main():
    message = EmailMessage()
    message['From'] = 'no-reply@farmersbusinessnetwork.com'
    message['Reply-To'] = """MEGAN FOOOBAAAAAR <abcfghijkladbfrg@akdja.com>,"KDJEHGI, SCOTT KJUYT" <abcfghijkladbfrg@akdja.com>"""
    message['To'] = """"KDJEHGI, SCOTT KJUYT" <SCOTT.KDJEHGI@MYFNBBANK.COM>"""
    message['Subject'] = "does not matter"
    message['CC'] = """MEGAN FOOOBAAAAAR <abcfghijkladbfrg@akdja.com>,"KDJEHGI, SCOTT KJUYT" <abcfghijkladbfrg@akdja.com>"""
    message.set_content('foo bar')
    print(message.as_string())


if __name__ == '__main__':
    main()
History
Date User Action Args
2021-11-29 22:10:40thehesiodsetrecipients: + thehesiod, barry, r.david.murray
2021-11-29 22:10:40thehesiodsetmessageid: <1638223840.93.0.45573972976.issue45932@roundup.psfhosted.org>
2021-11-29 22:10:40thehesiodlinkissue45932 messages
2021-11-29 22:10:40thehesiodcreate