note 46637 added to function.imap-fetchbody

From: Date: Mon, 18 Oct 2004 17:49:05 +0000
Subject: note 46637 added to function.imap-fetchbody
Groups: php.notes 
Request: Send a blank email to php-notes+get-78732@lists.php.net to get a copy of this message
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-- ---- Manual Page -- http://www.php.net/manual/en/function.imap-fetchbody.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46637 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46637&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46637&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46637&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46637&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46637&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46637&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46637&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#78732) next »