On Fri, Apr 14, 2006 at 12:12:50PM -0500, Lukasz Szybalski wrote:
> One last question.
> Is there an easy way to covert body of an email into lines starting with ">"
> 
> If I received in my payload(), body of an email:
> hello
> how are you
> 
> I want to send a response with quoted part:
> hi
> >hello
> >how are you

body = message.get_payload()
answer = ["> %s" % line for line in body.split('\n')]
reply = '\n'.join(answer)

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Email-SIG mailing list
[email protected]
Your options: 
http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com

Reply via email to