I would like to parse (serialize) a multipart email (or any and all types with multiple email attachments having inline images, attachments etc), set its body content-type with some extra information and re-generate the email before sending it out. How can this be achieved with the most simplest python code? Using python version 3.6. Right now I am using email.walk() and getting the first available text/plain, text/html and assume its the body of the covering mail, Further parsing recursively thru' the different parts of the mail by walk()...this seems cumbersome. Any easy method?
from Using python 3.7, how to ensure that a parsed email is re-generated correctly after modifying its body content correctly without losing any content?
No comments:
Post a Comment