Skip to content Skip to sidebar Skip to footer

Python - Forward Imap Email With Attachments (imaplib, Smtplib)

I'm having trouble forwarding mail with attachments. Can anyone point me in the right direction? I'm guessing it's in the Fetch statement but am unsure. import sys import uuid impo

Solution 1:

If you want to use imaplib, why not just fetch the whole message (RFC822)? See this similar SO question:

How to fetch an email body using imaplib in python?

Solution 2:

It was the fetch... adding a fetch for (BODY[]) did the trick.

Post a Comment for "Python - Forward Imap Email With Attachments (imaplib, Smtplib)"