Commit 9d95de03 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

mail message: multipart/alternative: avoid choosing the text/plain part if it...

mail message: multipart/alternative: avoid choosing the text/plain part if it is empty (yes it happens...)
parent 3d48946b
......@@ -465,12 +465,13 @@ void MimeHandlerMail::walkmime(Binc::MimePart* doc, int depth)
else if (!stringlowercmp("text/html", content_type.value))
ithtml = it;
}
if (ittxt != doc->members.end()) {
LOGDEB2("walkmime: alternative: chose text/plain part\n");
walkmime(&(*ittxt), depth);
if (ittxt != doc->members.end() && ittxt->bodylength) {
LOGDEB2("walkmime: alternative: choose text/plain. Size: " <<
ittxt->bodylength << endl);
walkmime(&(*ittxt), depth);
} else if (ithtml != doc->members.end()) {
LOGDEB2("walkmime: alternative: chose text/html part\n");
walkmime(&(*ithtml), depth);
LOGDEB2("walkmime: alternative: choose text/html.\n");
walkmime(&(*ithtml), depth);
}
}
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment