IMAP functions help

From: Date: Mon, 17 Jun 2002 12:07:28 +0000
Subject: IMAP functions help
Groups: php.general 
Request: Send a blank email to php-general+get-102496@lists.php.net to get a copy of this message
Hi I'm writing a multi-user email system to run off of one POP3 email address, however I've run into some problems. Displaying the actually body of the email itself is pretty easy, however I'm having problems with different types of encoding which are causing things to be displayed incorrectly. The first is text/plain: Random characters seemed to get turned into other ASCII characters. For example, the pound sign - "£" - becomes "=A3", so that "£10" would become "=A310". The second is with text/html encoding types: With text/html, random "3D"s keep getting put into tags. For example, a normal font tag, <FONT face="Trebuchet MS" color=#ff0000 size=2> becomes <FONT face=3D"Trebuchet MS" color=3D#ff0000 size=3D2>. And normal text on the html page gets ASCII characters, specifically the = sign, put in it. For example, "hello world. hows it going?" becomes "hello world. = hows it=20 going?". The third is with binary encoding types. Obviously, I don't want my script to display an email body which is of a binary encoding, but I don't know how to get the script to detect what type of encoding it is (for example, if its text/html I want it to display it, but if its audio/x-wav I want it to download the body into a filename which is specified by the email, then a link is given to the file. I also don't know how to do this.) At the moment I'm using a simple imap_body() to display the body of the email. How would I get it to split up the email into its separate parts (ie if its text/plain and text/html, or text/plain with a binary attachment etc.) and solve the problems above? Thanks for any help anyone can give, Matt

« previous php.general (#102496) next »