[Tutor] Splitting email headers when using imaplib

Dave Angel davea at davea.name
Wed Feb 5 13:36:40 CET 2014


 spir <denis.spir at gmail.com> Wrote in message:

> 
> I have no idea of the pattern or structure of email headers. Would you post some 
> example of 'msg_header_content[0][1]'?
> 
> In the meantine, try to suppress \r from the regex formats. (Shouldn't be here, 
> because when reading strings from files, python converts newlines into \n

Only for text files. These headers use 0d0a as part of the
 specified format, so it'd probably be best not to ignore
 them.


-- 
DaveA



More information about the Tutor mailing list