Wednesday 02 May 2007 2:21:42 pm
Hi everyone, First off, thanks for your efforts. Today is my first time using your components and they are exceptional. I looked here for an answering to the following but had no luck: When using ezcMailParser(), I can get information out of the headers as follows:
$set = new ezcMailFileSet( array( $currentEmail ));
$parser = new ezcMailParser(); $mail = $parser->parseMail( $set );
$mailFrom = $mail[0]->from;
$mailTo = $mail[0]->to;
$mailCC = $mail[0]->cc;
$mailBCC = $mail[0]->bcc;
$mailSubject = $mail[0]->subject;
$mailTimeStamp = date(DATE_RFC822, $mail->timestamp); $mailMessageID = $mail[0]->messageId; This works just fine when I pass in a file of a single email. I need to be able to get more information out of the header, though, and if I print_r($mail) I can see quite a bit of information in there I need for my application. I just don't know how to extract it in PHP. For example,
[map:private] => Array
(
[Return-Path] => <joe@nerdnet.com>
[X-Spam-Checker-Version] => SpamAssassin 3.1.8 (2007-02-13) on rsgmann.x.x
[X-Spam-Level] =>
[X-Spam-Status] => No, score=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, SPF_HELO_PASS autolearn=ham version=3.1.8 [Received] => from 70.96.x.x ([70.96.x.x]) by mail.server.com I need to be able to get the "Received" field there to grab an IP address out of it, but I can't figure out how to access it inside the object. Can you provide any info on this? Thanks very much.
|