note 46637 rejected from function.imap-fetchbody by sean
| From: | sean@php.net | Date: | Mon, 18 Oct 2004 17:55:10 +0000 |
| Subject: | note 46637 rejected from function.imap-fetchbody by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78733@lists.php.net to get a copy of this message | ||
Note Submitter: zero AT mutante.at
----
Hello everybody! If someone can give me a hint or sth. else PLEASE!
I have to parse an e-mail but i can't get the eesential parts of the body. The message is
multipart/alternative. I tried several different scripts to parse out the content type and it works
pretty well i think. But i can't get the specific parts out of the mail with
imap_fetchbody(....."$partnum").
E.g.: I just wanna have the "text/plain" part.
This is the mail:
.......
.......
.......
Content-Type: multipart/alternative;
boundary="------------030202020001040909000105"
This is a multi-part message in MIME format.
--------------030202020001040909000105
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
...........
............. some text
..............
--------------030202020001040909000105
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
.......
.......some html
.......
</html>
--------------030202020001040909000105--