Doc #64768 [NEW]: mail parser can't get total contents of "From" and "To"
| From: | bill dot yang at watchguard dot com | Date: | Fri, 03 May 2013 03:05:53 +0000 |
| Subject: | Doc #64768 [NEW]: mail parser can't get total contents of "From" and "To" | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-9775@lists.php.net to get a copy of this message | ||
From: bill dot yang at watchguard dot com
Operating system: freebsd 7.0
PHP version: 5.5.0beta4
Package: *Mail Related
Bug Type: Documentation Problem
Bug description:mail parser can't get total contents of "From" and "To"
Description:
------------
---
From manual page:
http://www.php.net/function.mailparse-msg-parse-file#refsect1-function.mailparse-msg-parse-file-description
---
I use php5 pcre.
I don't know the reason, perhaps it's because configure of mail parse.
Test script:
---------------
function _process_mail_file($qfile)
{
// parse the message and return a mime message resource
$mime = mailparse_msg_parse_file($qfile);
// get message structure
$struct = mailparse_msg_get_structure($mime);
// get message parts based on message structure
$parts = array();
foreach ($struct as $part_id) {
$part = mailparse_msg_get_part($mime, $part_id);
//Following line when print_r($parts[$part_id]); the mail header "From" and
"To" contents just have user name, don't have email address.
$parts[$part_id] = mailparse_msg_get_part_data($part);
}
// free mime resource
mailparse_msg_free($mime);
return $parts;
}
Expected result:
----------------
have email address for "From" and "To"
Actual result:
--------------
There aren't mail address.
--
Edit bug report at https://bugs.php.net/bug.php?id=64768&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64768&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64768&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64768&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=64768&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=64768&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64768&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=64768&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=64768&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=64768&r=support
Expected behavior: https://bugs.php.net/fix.php?id=64768&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=64768&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=64768&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=64768&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64768&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=64768&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=64768&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=64768&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64768&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64768&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=64768&r=mysqlcfg