be more greedy and try to parse everything that looks remotely as a MIME mail as a MIME mail. Even if it was produced by Apple Mail.

Roker 2 years ago
parent 4fdbd0a916
commit d98265fde5

@ -239,10 +239,10 @@ void handle_mime(message* msg, const MimeHeaders& mh, const BodyLines& body)
// parses the header and fill the parts in msg
void parse_body(message* msg, const HeaderSection& headers, const BodyLines& body)
const std::string mime_version = header_value(headers, "mime-version").to_string();
LOG << "ParseBody: " << body.size() << " body lines.\n";
if( mime_version == "1.0" ) // TODO: According to RFC 2048 there can be comments in the header field value. -.-
// anything that might be a MIME mail I try to parse as a MIME mail:
if( header_value(headers, "mime-version").size() || header_value(headers, "content-type").size() )
MimeHeaders mh(headers);
handle_mime(msg, mh, body);