Hello!
I have found that in some cases inline email attachments are ignored by email importer. Inside Importer class (method importPartDataToEmail) this condition:
if (isset($part->ContentDisposition)) {
is not met, so the inline attachment is not detected. Here is a simple patch I have used for myself, wich helped me. Take a look at it, please:
diff --git application/Espo/Core/Mail/Importer.php application/Espo/Core/Mail/Importer.php
index be7f09c..8687ce8 100644
--- application/Espo/Core/Mail/Importer.php
+++ application/Espo/Core/Mail/Importer.php
@@ -305,6 +305,11 @@ class Importer
$disposition = 'inline';
}
}
+ else if ($part->getHeaders()->has('Content-ID')) {
+ $contentId = trim($part->getHeaders()->get('Content-ID')->getFieldValue(), '<>');
+ $fileName = $contentId;
+ $disposition = 'inline';
+ }
if (isset($part->contentTransferEncoding)) {
$encoding = strtolower($part->getHeader('Content-Transfer-Encoding')->getTransferEncoding());
I have found that in some cases inline email attachments are ignored by email importer. Inside Importer class (method importPartDataToEmail) this condition:
if (isset($part->ContentDisposition)) {
is not met, so the inline attachment is not detected. Here is a simple patch I have used for myself, wich helped me. Take a look at it, please:
diff --git application/Espo/Core/Mail/Importer.php application/Espo/Core/Mail/Importer.php
index be7f09c..8687ce8 100644
--- application/Espo/Core/Mail/Importer.php
+++ application/Espo/Core/Mail/Importer.php
@@ -305,6 +305,11 @@ class Importer
$disposition = 'inline';
}
}
+ else if ($part->getHeaders()->has('Content-ID')) {
+ $contentId = trim($part->getHeaders()->get('Content-ID')->getFieldValue(), '<>');
+ $fileName = $contentId;
+ $disposition = 'inline';
+ }
if (isset($part->contentTransferEncoding)) {
$encoding = strtolower($part->getHeader('Content-Transfer-Encoding')->getTransferEncoding());
Comment