diff options
-rw-r--r-- | src/attachmentHelper.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/attachmentHelper.cpp b/src/attachmentHelper.cpp index c1a1f057..0a780711 100644 --- a/src/attachmentHelper.cpp +++ b/src/attachmentHelper.cpp @@ -48,6 +48,14 @@ const bool attachmentHelper::isBodyPartAnAttachment(ref <const bodyPart> part) if (disp.getName() != contentDispositionTypes::INLINE) 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&) { |