maybe fixed then null issue for non-mime type declared attachments

This commit is contained in:
Karl Cordes 2010-04-27 16:18:45 +10:00
parent 06d9afaa62
commit 32d0477202

View file

@ -109,7 +109,10 @@ class VaultShell extends Shell {
if( ($attachment['type'] != 'text/html') && ($attachment['type'] != 'multipart/mixed') &&
($attachment['type'] != 'multipart/alternative') &&
($attachment['type'] != 'multipart/report') &&
($attachment['type'] != 'text/plain')
($attachment['type'] != 'text/plain') &&
($attachment['type'] != 'text/rfc822-headers') &&
($attachment['type'] != 'message/delivery-status')
) {
$this->EmailAttachment->create();
@ -197,6 +200,11 @@ class VaultShell extends Shell {
$words = explode(' ', $output[$i]);
$type = explode('=', $words[1]);
$name = explode('=', $words[2]);
if($type == "" || $name == "") {
next;
}
$attachments[$j]['type'] = $type[1];
$attachments[$j]['name'] = $name[1];
echo "in message number $msg_number ($uniqid): found attachment ".$attachments[$j]['name'].' '.$attachments[$j]['type']."\n";