tags:

views:

23

answers:

0

Hi, I am trying to get forward id from email obj.

from_address = rfc822.parseaddr(emailobj.get('from'))[1].strip().lower()

So from_address gives me the email id of the sender.

But my problem is when the email is forward how to get the email id of the forwarder. I tried

test = rfc822.parseaddr(emailobj.get('fwd:'))[1].strip().lower()

but it gives me None. Is there any way I can get the id using rfc822.parseaddr? Otherwise I have to search for string "---------- Forwarded message ----------" and then get the values of From:

Thanks