tags:

views:

32

answers:

0

Hi, What I am doing right now is reading the values from emailobj.

msg = data['emailobj']
message_body = get_plaintext_body(msg)


text_message = get_decoded_body(message_body)

So it works fine when the email is in text/plain. I can get the values out. But when the email comes in text/html all my codes goes wrong. How can I handle the this problem.

Basically user are sending email in some format like:

Name : laspal
Country : India
Email : [email protected]

So if its in html my email will become Email [email protected] == 20

How to handle it. thanks.