On 2018-07-15, Skip Montanaro <skip.montan...@gmail.com> wrote: > I have an email message in a file (see attached).
Attachments don't work here. > something like this should construct an email message from the file: > >>>> from email.message import EmailMessage >>>> msg = EmailMessage() >>>> fp = open("/home/skip/tmp/79487694") >>>> msg.set_content(fp.read()) What are you actually trying to do? You're talking like you're trying to read an existing RFC822 email-with-headers from a file, but you're showing code that creates a new email with body content set from a file, which is a completely different thing. -- https://mail.python.org/mailman/listinfo/python-list