From 1b7a7a76941a27acc7d68cd3674c12b6a6c3f038 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 19 Jan 2006 19:58:37 +0000 Subject: Treat 'inline' parts without Content-[Id/Location] as attachments. --- src/attachmentHelper.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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 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&) { -- cgit v1.2.3