Hi all,
I've a prob. using the imap functions ... with a simple code that retrieve a
multipart mail,
$struttura=imap_fetchstructure($link,2);//2 is the msg nr
$pezzi=0;
foreach($struttura as $key=>$val){
//some code
if($key=="parts"){
foreach($val as $w){
$pezzi++;
}
}
//now $pezzi is an int var that tell me how many parts has the msg
for($x=0;$x<(1+$pezzi);$x++){
print "<textarea cols=50 rows=10>";
if(eregi("Content-Type: text/html;",imap_fetchbody($link,2,$x))){
print quoted_printable_decode(imap_fetchbody($link,2,$x));
} else {
print imap_fetchbody($link,2,$x);
}
print "</textarea><br><br>";
}
//this loop show me the single part of the msg
the problem is: only if the part is concerning an embedded image, I can't
see the "header" of the part
(I mean this:
------=_NextPart_000_000D_01C0A127.2D37C500
Content-Type: image/gif;
name="chat.gif"
Content-Transfer-Encoding: base64
Content-ID: <000c01c0a11e$cb6bbbe0$0100a8c0@maxa>
)
but I see only the base64_encode source of the image file ....
My question are: is this due to a my mistake? How can I take the "header"
and the "source" if the part is concerning to an image file?
Many thanks in advance.
max
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]