Message407329
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() |
|
Date |
User |
Action |
Args |
2021-11-29 22:10:40 | thehesiod | set | recipients:
+ thehesiod, barry, r.david.murray |
2021-11-29 22:10:40 | thehesiod | set | messageid: <1638223840.93.0.45573972976.issue45932@roundup.psfhosted.org> |
2021-11-29 22:10:40 | thehesiod | link | issue45932 messages |
2021-11-29 22:10:40 | thehesiod | create | |
|