PHP Classes

report subtype

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  report subtype  >  (Un) Subscribe thread alerts  
Subject:report subtype
Summary:missed report-type in sub part non managed
Messages:4
Author:Giovanni Bartoli
Date:2012-10-17 07:20:09
Update:2012-10-19 05:47:16
 

  1. report subtype   Reply   Report abuse  
Picture of Giovanni Bartoli Giovanni Bartoli - 2012-10-17 07:20:09
Hi!
at the row 2219 there is a switch to control the sub-type of a multipart message.
In case the message missed the "delivery-status" parameter the answer is undefined.
A possible solution is to add something like this in the switch:
if(!IsSet($parameters['report-type'])) {
$parameters['report-type'] = 'delivery-status';
}

Of course this is just a temporary fix :D

  2. Re: report subtype   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2012-10-18 03:50:56 - In reply to message 1 from Giovanni Bartoli
Can you provide a sample with the type of message you are receiving, so I can reproduce the problem?

  3. Re: report subtype   Reply   Report abuse  
Picture of Giovanni Bartoli Giovanni Bartoli - 2012-10-19 04:05:57 - In reply to message 2 from Manuel Lemos
Ciao Manuel,
here the cut&paste of one the messages we receive from some mailer-daemon with the problem found.

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: (qmail 18382 invoked by uid 98); 16 Oct 2012 12:45:37 -0000
Delivered-To: [email protected]
Received: (qmail 18380 invoked by uid 98); 16 Oct 2012 12:45:37 -0000
Received: from unknown (HELO psmtp.com) (207.126.144.193)
by lipa.casacenina.com with SMTP; 16 Oct 2012 12:45:37 -0000
Received: from telefonica.net ([213.4.129.19]) by eu1sys200amx124.postini.com ([207.126.147.10]) with SMTP;
Tue, 16 Oct 2012 12:45:38 GMT
Received: from IMPmx5.adm.correo ([10.20.102.112])
by IMPaqm4.telefonica.net with bizsmtp
id Bl611k00R2RWG6a3Qoldfu; Tue, 16 Oct 2012 14:45:37 +0200
Return-Path: <[email protected]>
Date: Tue, 16 Oct 2012 14:45:37 +0200
From: Servicio de Correo Terra <[email protected]>
To: [email protected]
Subject: Delivery status notification
MIME-Version: 1.0
Content-Type: multipart/report; boundary="------------I305M09060309060P_856313503915370"
X-pstn-levels: (S: 0.68224/99.87609 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
X-pstn-dkim: 0 skipped:not-enabled
Message-ID: <[email protected]>
X-pstn-settings: 2 (0.5000:0.5000) s cv gt3 gt2 gt1 r p m c
X-pstn-addresses: from <[email protected]> [161/7]

This is a multi-part message in MIME format.

--------------I305M09060309060P_856313503915370
Content-Type: text/plain; charset=UTF-8;
Content-Transfer-Encoding: 8bit

============================================================================
Notificación del estado del envío.

El envío a los siguientes destinatarios ha sido descartado despues de 0 segundo(s):

* [email protected]


============================================================================
Detalles Tecnicos:

SMTP: host 10.20.102.84: 552 RCPT TO:<[email protected]> Mailbox disk quota exceeded


============================================================================


--------------I305M09060309060P_856313503915370
Content-Type: message/rfc822; charset=UTF-8;
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment


Received: from lipa.casacenina.com ([85.17.146.5])
by IMPmx5.adm.correo with BIZ IMP
id Bolc1k00l07CgmD05olc2w; Tue, 16 Oct 2012 14:45:37 +0200
X-Brightmail-Tracker: AAAAAA==
Received: (qmail 18374 invoked by uid 33); 16 Oct 2012 12:45:35 -0000
Date: 16 Oct 2012 12:45:35 -0000
Message-ID: <[email protected]>
To: "EMILIA HERMIDA" <[email protected]>
Subject: =?ISO-8859-1?Q?tu_pedido_117747?=
X-PHP-Originating-Script: 33:email.php
From: "Casa Cenina" <[email protected]>
MIME-Version: 1.0
X-Mailer: osCommerce
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit


--------------I305M09060309060P_856313503915370--

  4. Re: report subtype   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2012-10-19 05:47:16 - In reply to message 3 from Giovanni Bartoli
This message is malformed because it misses the report type, so the class does not know how to process it.

It can just make the class return an unknown report type but that may not be useful for anything, as the data it contains is not in a parsable format.