Treat 'inline' parts without Content-[Id/Location] as attachments.
This commit is contained in:
parent
8e0080b0ed
commit
1b7a7a7694
@ -48,6 +48,14 @@ const bool attachmentHelper::isBodyPartAnAttachment(ref <const bodyPart> part)
|
|||||||
|
|
||||||
if (disp.getName() != contentDispositionTypes::INLINE)
|
if (disp.getName() != contentDispositionTypes::INLINE)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// If the Content-Disposition is 'inline' and there is no
|
||||||
|
// Content-Id or Content-Location field, it is an attachment
|
||||||
|
if (!part->getHeader()->hasField(vmime::fields::CONTENT_ID) &&
|
||||||
|
!part->getHeader()->hasField(vmime::fields::CONTENT_LOCATION))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (exceptions::no_such_field&)
|
catch (exceptions::no_such_field&)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user