Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I'm using Mail/mimeDecode to process incoming email with php.
When recieving outlook originated emails, i get this error:
PHP Notice: Undefined property: body in /home/httpd/vhosts/woomenow.com/redir_test.php on line 44
I have no idea why this is happening. It works fine with Apple Mail and Gmail originating emails. I'm not doing anything out of the ordinary with the code in terms of using the pear package.
Can someone help me out,
Thanks in advance.
Here is a code snippetCode: Select all
$fp = fopen("/home/httpd/vhosts/domain.com/email.txt", "r");
$email = "";
while(!feof($fp)) {
$email .= fread($fp, 1024);
}
fclose($fp);
$params = array();
$params['include_bodies'] = true;
$params['decode_bodies'] = true;
$params['decode_headers'] = true;
//decode the email
$decode = new Mail_mimeDecode($email, "\r\n");
$structure = $decode->decode($params);
$all_emails = $structure->headers['to'].", ".$structure->headers['cc'];
$emails = explode(",",$all_emails);
...
$msg = $structure->body;
$msg .= "\n\n---------------------------\n";feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]