Diffstat (limited to 'noncore/net/mail/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/imapwrapper.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp index ad95384..a4e6228 100644 --- a/noncore/net/mail/imapwrapper.cpp +++ b/noncore/net/mail/imapwrapper.cpp @@ -394,2 +394,5 @@ void IMAPwrapper::searchBodyText(const RecMail&mail,mailimap_body_type_1part*mai body_text = fetchPart(mail,path,true); + if (singlePart.Encoding()=="quoted-printable") { + body_text = decode_quoted_printable(body_text.latin1()); + } target_body.setBodytext(body_text); @@ -401,2 +404,5 @@ void IMAPwrapper::searchBodyText(const RecMail&mail,mailimap_body_type_1part*mai body_text = fetchPart(mail,path,true); + if (singlePart.Encoding()=="quoted-printable") { + body_text = decode_quoted_printable(body_text.latin1()); + } target_body.setBodytext(body_text); @@ -457,3 +463,3 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) -QString IMAPwrapper::fetchPart(const RecMail&mail,const QValueList<int>&path,bool internal_call) +QString IMAPwrapper::fetchPart(const RecMail&mail,const QValueList<int>&path,bool internal_call,const QString&enc) { @@ -509,3 +515,7 @@ QString IMAPwrapper::fetchPart(const RecMail&mail,const QValueList<int>&path,boo if (text) { - body = QString(text); + if (enc=="quoted-printable") { + body = decode_quoted_printable(text); + } else { + body = QString(text); + } free(text); @@ -549,3 +559,3 @@ void IMAPwrapper::searchBodyText(const RecMail&mail,mailimap_body_type_mpart*mai if (currentPart.Type()=="text" && target_body.Bodytext().isNull() ) { - QString body_text = fetchPart(mail,clist,true); + QString body_text = fetchPart(mail,clist,true,currentPart.Encoding()); target_body.setDescription(currentPart); @@ -707,3 +717,3 @@ QString IMAPwrapper::fetchPart(const RecMail&mail,const RecPart&part) { - return fetchPart(mail,part.Positionlist(),false); + return fetchPart(mail,part.Positionlist(),false,part.Encoding()); } |