I\'m writing some code to parse forwarded emails. What I\'m not sure is if maybe there is some Python library, some RFC I could stick to or some other resou
Standard for a reply/forward is > prepending each line the number of times the mail is nested including who sent the initial e-mail is up to the client to sort out. So what you need to do in python is simply add > to the start of each line.
imap Test Wrote:
>
>twice
>imap Test wrote:
>> nested
>>
>> imap@gazler.com wrote:
>>> test
>>>
>>> --
>>> Message sent via AHEM.
>>>
>>
>
Attachments just simply need to be attached to the message or as you put it 'go wild.'
I am not familiar with python, but believe the code would be:
string = string.replace("\n","\n>")