[imp] multipart/report message viewing

dimon at intellinetinc.com dimon at intellinetinc.com
Fri Feb 28 10:46:43 PST 2003


I found that this small  patch worked for multipart/report message viewing.
Before it didn't work, 'cause it was looking for Action: field in the second 
part instead of the forst.

File: imp/lib/MIME/Viewer/status.php

        /* RFC 3464 [2]: There are three parts to a delivery status
           multipart/report message:
             (1) Human readable message
             (2) Machine parsable body part (message/delivery-status)
             (3) Returned message (optional)

           Information on the message status is found in the 'Action' field
           located in part #2 (RFC 2464 [2.3.3]). It can be either 'failed',
           'delayed', 'delivered', 'relayed', or 'expanded'. */
        $action = null;
--        $part2 = $contents->getDecodedMIMEPart($id . 2);
++        $part2 = $contents->getDecodedMIMEPart($id . 1);
        foreach (explode("\n", $part2->getContents()) as $line) {
            if (strstr($line, 'Action:') !== false) {
            }   $pos = strpos($line, ':') + 1;
            }   $action = trim(substr($line, $pos));
            }   break;
            }
        }

Best Regards,
Dmitry


More information about the imp mailing list