php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59152 mailparse part numbers and IMAP
Submitted: 2010-04-09 11:50 UTC Modified: -
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: magicaltux@php.net Assigned:
Status: Open Package: mailparse (PECL)
PHP Version: 5.3.2 OS: Linux Gentoo 2.6.33
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: magicaltux@php.net
New email:
PHP Version: OS:

 

 [2010-04-09 11:50 UTC] magicaltux@php.net
Description:
------------
While writing an IMAP server I needed to parse mime mails 
serverside (it's a feature of imap servers).
Mailparse saved me, however part ids in mailparse do not 
match imap part ids.

Ref: RFC 3501 page 55

In IMAP, when a multipart is found at the root of the mail, 
or if its parent is a message/rfc822 part, it is "merged" 
with its parent.
For example my test email has the following ids:

mailparse:

1: multipart/mixed us-ascii
1.1: text/plain us-ascii 8bit
1.2: message/rfc822 us-ascii 8bit
1.2.1: multipart/mixed us-ascii 8bit
1.2.1.1: multipart/alternative us-ascii 8bit
1.2.1.1.1: text/plain iso-8859-1 8bit
1.2.1.1.2: text/html iso-8859-1 8bit
1.2.1.2: application/msword us-ascii

imap4rev1:

TEXT: multipart/mixed us-ascii
1: text/plain us-ascii 8bit
2: message/rfc822 us-ascii 8bit
2.TEXT: multipart/mixed us-ascii 8bit
2.1: multipart/alternative us-ascii 8bit
2.1.1: text/plain iso-8859-1 8bit
2.1.2: text/html iso-8859-1 8bit
2.2: application/msword us-ascii

A way to fetch imap part id (or to "switch" to imap part 
format) would be great (for now I have implemented a routine 
in php to generate imap part ids based on mail structure)


Patches

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 05:01:29 2024 UTC