How to convert text/html mail into readable thing ?

From: Date: Fri, 19 Oct 2001 14:24:03 +0000
Subject: How to convert text/html mail into readable thing ?
Groups: php.general 
Request: Send a blank email to php-general+get-71594@lists.php.net to get a copy of this message
I am using PHP @ Red Hat. And i have got one big problem: I am writing interface for pop3 accounts. Everything is ok, when mail are normal, it means their has got attachments, or not. But when i am reading mail which has been written in html, and it has got also attachment, i got for example: ------=_NextPart_001_000B_01C158B1.7C25EB00 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable ----- Original Message -----=20 From: rafal=20 To: bluszcz@bluszcz.localdomain=20 Sent: Friday, October 19, 2001 2:01 PM Subject: buziak eretertetret ------=_NextPart_001_000B_01C158B1.7C25EB00 Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable <here is html message> *** When mail has been written in html and hasnt got att. everything is ok. main fragment of my script: <? $mbox = imap_open ("{10.1.1.4:110/pop3}INBOX", $login, $pass); $mailik=imap_fetchstructure ($mbox,$mail); $czesci=$mailik->parts; echo htmlentities(imap_fetchbody ($mbox, $mail, 1)); $mailek=imap_fetchbody ($mbox, $mail, 1); /* Here is part script for list attachments. */ imap_close($mbox); ?> Thanks for helps. -- Rafal Zawadzki rafael@ats.com.pl Linux registered user #232814

« previous php.general (#71594) next »