mail: mail is now capable to read Mailer-Daemons and extract parts as attachment
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3782 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
22
mail.php
22
mail.php
@@ -916,13 +916,23 @@ class mail
|
||||
continue;
|
||||
$disposition = $this->getHeaderValue ("Content-Disposition",
|
||||
$section["_headersArray"]);
|
||||
if ($disposition === false)
|
||||
if ($disposition !== false)
|
||||
{
|
||||
if ($inline === true && substr ($disposition, 0, 6) === "inline")
|
||||
$res[] = $sectionID;
|
||||
elseif ($inline === false &&
|
||||
substr ($disposition, 0, 10) === "attachment")
|
||||
$res[] = $sectionID;
|
||||
continue;
|
||||
if ($inline === true && substr ($disposition, 0, 6) === "inline")
|
||||
$res[] = $sectionID;
|
||||
elseif ($inline === false &&
|
||||
substr ($disposition, 0, 10) === "attachment")
|
||||
$res[] = $sectionID;
|
||||
}
|
||||
// The Mailer-Daemons use Content-Type: message/XXXX
|
||||
$contentType = $this->getHeaderValue ("Content-Type",
|
||||
$section["_headersArray"]);
|
||||
if ($contentType !== false && substr ($contentType, 0, 8) === "message/")
|
||||
{
|
||||
if ($inline === false)
|
||||
$res[] = $sectionID;
|
||||
}
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user