import sys,email data = r'''Date: Mon, 17 Jan 2011 01:10:29 -0200 (BRST) From: "Pank! é bom demais." To: Subject: =?iso-8859-1?Q?Pague_R$50,00_por_R$100,00_em_compras_e_aproveite_a_melhor?= =?iso-8859-1?Q?_sele=E7=E3o_de_perfumes_e_cosm=E9ticos_com_pre=E7os_imper?= =?iso-8859-1?Q?d=EDveis!?= Message-ID: <20110117031029.DE4ED568469@al88.auinmeio.com.br> ''' msg = email.message_from_string(data) allh = msg.items()[:] if len(allh): for (f, b) in allh: del msg[f] for (f, b) in allh: msg[f] = email.header.make_header(email.header.decode_header(b)) print(msg)