Re: Image from MIME email
| From: | Erwin | Date: | Thu, 14 Nov 2002 14:01:15 +0000 |
| Subject: | Re: Image from MIME email | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-124427@lists.php.net to get a copy of this message | ||
Christoph wrote:
> Hello,
>
> I'm currently programming a webmail interface with php 4.1.2 and
> c-client 2001.
> I'm getting the Mime data from the mail.
> Now I have the image data as text but how I can get it into an <img>
> field?
At first, you'll have to convert the data back to binary using the encoding
specified in the header (of that MIME part). Then you'll have to save the
image to the disk (or to a database), after which you can use the <img> tag.
Be sure to give the filename the correct extension (which you can gain using
the content-type, also specified in the header of that MIME-part).
Grtz Erwin