PHP Classes

Undefined index: FileDisposition

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Undefined index: FileDisposition  >  (Un) Subscribe thread alerts  
Subject:Undefined index: FileDisposition
Summary:Not parsing html attachment
Messages:7
Author:Bill
Date:2011-05-11 22:50:28
Update:2011-05-13 22:07:06
 

  1. Undefined index: FileDisposition   Reply   Report abuse  
Picture of Bill Bill - 2011-05-11 22:50:28
This is a very complete script, thank you. I'm having a problem parsing emails with attachments as I'm consistently getting:
PHP Notice: Undefined index: FileDisposition

I found your scripts here:
damnsemicolon.com/php/php-parse-ema ...

and this is the code I'm using. I'm getting the same results when I use your test message examples as well. Here's the link to my complete test file:
gist.github.com/967563

  2. Re: Undefined index: FileDisposition   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-05-12 01:43:30 - In reply to message 1 from Bill
Can you provide a sample message file complete with headers and body so I can try to reproduce the problem?

  3. Re: Undefined index: FileDisposition   Reply   Report abuse  
Picture of Bill Bill - 2011-05-12 01:59:19 - In reply to message 2 from Manuel Lemos
This is a copy of mine and yours.
gist.github.com/967795

Thanks!

  4. Re: Undefined index: FileDisposition   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-05-13 04:25:03 - In reply to message 3 from Bill
I could not reproduce the problem. Are you sure you are using the latest version of the MIME parser class?

  5. Re: Undefined index: FileDisposition   Reply   Report abuse  
Picture of Bill Bill - 2011-05-13 20:59:26 - In reply to message 4 from Manuel Lemos
I just re-downloaded the zip and replaced the files to make sure and it's still happening. I'm running on Ubuntu using the following command for testing:
sudo /usr/bin/php /var/www/test.php < /var/mail/testemail.eml

I'm running as root to make sure there are no permissions issues until I get this fixed and am still getting the same error:
--------------------------------
PHP Notice: Undefined index: name in /var/www/test.php on line 36
PHP Notice: Undefined index: in-reply-to: in /var/www/test.php on line 47


Message ID: [email protected]

Reply ID:

Subject: Test

To: [email protected]

From: Bill XXXX [email protected]

Body: --
Bill XXXX



PHP Notice: Undefined index: FileDisposition in /var/www/test.php on line 92
Array
(
[0] => bookmarks-really-short.html
)
Any other thoughts? I really appreciate your help.

  6. Re: Undefined index: FileDisposition   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-05-13 21:57:24 - In reply to message 5 from Bill
But those notices are in your code of test.php script. You are accessing array entries that do not exist.

  7. Re: Undefined index: FileDisposition   Reply   Report abuse  
Picture of Bill Bill - 2011-05-13 22:07:06 - In reply to message 6 from Manuel Lemos
Doesn't that mean the attachment isn't being properly written to the file system?