summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/imapwrapper.cpp3
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp
index ae196bb..b437df0 100644
--- a/noncore/net/mail/imapwrapper.cpp
+++ b/noncore/net/mail/imapwrapper.cpp
@@ -627,49 +627,50 @@ void IMAPwrapper::fillSingleTextPart(RecPart&target_part,mailimap_body_type_text
}
QString sub;
sub = which->bd_media_text;
qDebug("Type= text/%s",which->bd_media_text);
target_part.setSubtype(sub.lower());
target_part.setLines(which->bd_lines);
fillBodyFields(target_part,which->bd_fields);
}
void IMAPwrapper::fillSingleMsgPart(RecPart&target_part,mailimap_body_type_msg*which)
{
if (!which) {
return;
}
target_part.setSubtype("rfc822");
qDebug("Message part");
/* we set this type to text/plain */
target_part.setLines(which->bd_lines);
fillBodyFields(target_part,which->bd_fields);
}
void IMAPwrapper::fillMultiPart(RecPart&target_part,mailimap_body_type_mpart*which)
{
if (!which) return;
- target_part.setSubtype(which->bd_media_subtype);
+ QString sub = which->bd_media_subtype;
+ target_part.setSubtype(sub.lower());
if (which->bd_ext_mpart && which->bd_ext_mpart->bd_parameter && which->bd_ext_mpart->bd_parameter->pa_list) {
clistcell*cur = 0;
mailimap_single_body_fld_param*param=0;
for (cur = clist_begin(which->bd_ext_mpart->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) {
param = (mailimap_single_body_fld_param*)cur->data;
if (param) {
target_part.addParameter(QString(param->pa_name).lower(),QString(param->pa_value));
}
}
}
}
void IMAPwrapper::fillSingleBasicPart(RecPart&target_part,mailimap_body_type_basic*which)
{
if (!which) {
return;
}
QString type,sub;
switch (which->bd_media_basic->med_type) {
case MAILIMAP_MEDIA_BASIC_APPLICATION:
type = "application";
break;
case MAILIMAP_MEDIA_BASIC_AUDIO:
type = "audio";
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
index ae196bb..b437df0 100644
--- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
@@ -627,49 +627,50 @@ void IMAPwrapper::fillSingleTextPart(RecPart&target_part,mailimap_body_type_text
}
QString sub;
sub = which->bd_media_text;
qDebug("Type= text/%s",which->bd_media_text);
target_part.setSubtype(sub.lower());
target_part.setLines(which->bd_lines);
fillBodyFields(target_part,which->bd_fields);
}
void IMAPwrapper::fillSingleMsgPart(RecPart&target_part,mailimap_body_type_msg*which)
{
if (!which) {
return;
}
target_part.setSubtype("rfc822");
qDebug("Message part");
/* we set this type to text/plain */
target_part.setLines(which->bd_lines);
fillBodyFields(target_part,which->bd_fields);
}
void IMAPwrapper::fillMultiPart(RecPart&target_part,mailimap_body_type_mpart*which)
{
if (!which) return;
- target_part.setSubtype(which->bd_media_subtype);
+ QString sub = which->bd_media_subtype;
+ target_part.setSubtype(sub.lower());
if (which->bd_ext_mpart && which->bd_ext_mpart->bd_parameter && which->bd_ext_mpart->bd_parameter->pa_list) {
clistcell*cur = 0;
mailimap_single_body_fld_param*param=0;
for (cur = clist_begin(which->bd_ext_mpart->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) {
param = (mailimap_single_body_fld_param*)cur->data;
if (param) {
target_part.addParameter(QString(param->pa_name).lower(),QString(param->pa_value));
}
}
}
}
void IMAPwrapper::fillSingleBasicPart(RecPart&target_part,mailimap_body_type_basic*which)
{
if (!which) {
return;
}
QString type,sub;
switch (which->bd_media_basic->med_type) {
case MAILIMAP_MEDIA_BASIC_APPLICATION:
type = "application";
break;
case MAILIMAP_MEDIA_BASIC_AUDIO:
type = "audio";