NYCPHP Meetup

NYPHP.org

[nycphp-talk] IMAP function imap_rfc822_parse_headers

Hans Zaunere hans at nyphp.org
Wed Nov 20 13:16:54 EST 2002


--- Jean B Flamand <jean at ufinity.com> wrote:
> Hi all
>  
> imap_rfc822_parse_headers
> <http://www.php.net/manual/en/function.imap-rfc822-parse-headers.php>
> (StringHeader) return an Object with all properties of the header.
>  
> My Probem : I m trying to parse a normal mail header with this function.
> It normally returns an object , but in my case this object is empty, i
> tried on several headers the problem keeps repeating !
> Do you know if there s any "pre" parsing to do on the string or if you
> had any problem with this function can you tell me what happened to you

I haven't used this function myself, but consider a couple things:

-- what kind of line termination are you using?  I think these functions may
have had some issues with \\r\
 vs \
 vs \
\\r

-- Try a *very* simple header, ie:
$test_header = "From: blah at hah.com\\r\
To:to at woo.com\\r\
\\r\
";

-- do other functions from this extension work?  Check that they're
configured properly, and it can find the c-client libs.

Hans



> ?
>  
> Thanks for your help.
>  
> JB
> 
> 
> 
> --- Unsubscribe at http://nyphp.org/list/ ---
> 
> 


=====
Hans Zaunere
New York PHP
http://nyphp.org
hans at nyphp.org



More information about the talk mailing list