Mail::mimeDecode
| From: | Juan Nin | Date: | Wed, 19 Nov 2003 00:34:57 +0000 |
| Subject: | Mail::mimeDecode | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-9014@lists.php.net to get a copy of this message | ||
Hi
After reading Gijs van Tulder's "Using PEAR's mimeDecode module"
(http://www.evolt.org/article/Using_PEAR_s_mimeDecode_module/18/60103/),
I've been able te write some PHP code to display mail messages.
The problem I'm having is on how to display images inserted on HTML
text. For each inserted image I will have something like:
<IMG SRC="cid:1069201061.4874.3.camel@myserver.mydomain.com" WIDTH="30%"
ALIGN="top" ALT="" BORDER="0">
and then:
--=-BPDLCsrUGfR0+W7T54Qm
Content-ID: <1069201061.4874.3.camel@myserver.mydomain.com>
Content-Disposition: attachment; filename=picture.jpg
Content-Type: image/jpeg; name=picture.jpg
Content-Transfer-Encoding: base64
I'm able to get the file type with ctype_primary and ctype_secondary,
and the filename with d_parameters['filename']
now, I need to get the Content-ID value, in order to replace the <IMG
SRC=""> in the HTML and make it point to a link like
showimage.php?id=1069201061.4874.3.camel@myserver.mydomain.com or
something like that, where that PHP page will find the image in the
message source and decode it (where I'll need the
Content-Transfer-Encoding value too..)
how can I get these values for an attachment???
I've searched through the docs, and googled a lot, but there's too
little info on the module... :(
thanks in advance,
Juan