Florian Lanthaler wrote:
> On Tue, Sep 18, 2007 at 13:15:10 -0400, Dave Fischetti wrote:
>> Just following up with some more information...
>>
>> Here is what the full mail object looks like. I assume that the  
>> received message's header is just not formated properly, or is it a  
>> problem with eZ?.
>>
>> I figured that if I get the FROM in the message with
>>
>> $from = formatAddress( $mail->from );
>> if ($from == "") $from = formatAddress( $mail->returnPath );
>>
>> but how can I get the TO: value? I see it in [Delivered-To]  but I'm  
>> not sure how to access it.
>>
>> Mail object output below:
>>
>> Thanks,
>>
>> Dave
> 
> [...]
> 
>>>> ////// ////// ////// ////// START -- EMAIL RAW  
>>>> SOURCE ////// ////// ////// //////
>>>> Return-Path: <[EMAIL PROTECTED]>
>>>> Delivered-To: [EMAIL PROTECTED]
>>>> Received: (qmail 15735 invoked from network); 14 Sep 2007 19:43:21  
>>>> -0400
>>>> Received: from smtp1.mo.bulk.sprintpcs.com (HELO  
>>>> mx.messaging.sprintpcs.com) (10.1.1.1)
>>>>   by mydomain.com with SMTP; 14 Sep 2007 19:43:21 -0400
>>>> Received-SPF: none (mydomain.com: domain at  
>>>> messaging.sprintpcs.com does not designate permitted sender hosts)
>>>> Received: from messaging.sprintpcs.com (lxnsmssf5- 
>>>> vip.nmcc.sprintspectrum.com [10.1.1.1])
>>>>    by mx.messaging.sprintpcs.com (Postfix) with SMTP id DDEC3F83CC
>>>>    for <[EMAIL PROTECTED]>; Fri, 14 Sep 2007 18:40:49 -0500 (CDT)
>>>> From:[EMAIL PROTECTED]
>>>> To:[EMAIL PROTECTED]
>>>> Subject:
>>>> X-OPWV-Extra-Message-Type:MO
>>>> Message-Id: <[EMAIL PROTECTED]>
>>>> Date: Fri, 14 Sep 2007 18:40:49 -0500 (CDT)
>>>>
>>>> Some message here
>>>> ////// ////// ////// ////// END -- EMAIL RAW  
>>>> SOURCE ////// ////// ////// //////
> 
> 
> The "To:" and "From:" headers of this message are formatted in a rather
> unusual way: both are missing a space between the colon and the value
> (email address). If I recall correctly, this space is optional and not
> requested by the RFC, but maybe ezc Mail is expecting it in order to
> parse the header fields correctly.
> 
> Regards,
> Florian

Hi Dave and Florian,

It seems the mail is quite broken and ezcMail cannot parse it correctly. 
The missing spaces in To and From are the problem as Florian said, but 
also the fact that the Subject contains nothing (is there a space after 
"Subject:"?).

I could only parse the email correctly if I added one space in To, From 
and Subject.

Dave: you can access the Delivered-To value with the getHeader() function:

$deliveredTo = $mail->getHeader( "Delivered-To" );

Please open an issue for this (broken parsing when space is missing in 
the headers) on http://issues.ez.no/ProjectSelect.php?Id=1 . We will 
then see if we need to fix this behaviour.

Cheers,
Alex.

-- 
Alexandru Stanoi
eZ Components System Developer
eZ Systems | http://ez.no
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to