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: -
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC