$attachdata[$x] = imap_base64($attachment); on that part sometimes the attachdata get empty so i did a IF but at that point i'm stuck. If i output it raw it will simply not work. Please help !
Here the code : if ($AsAttach == "Y") { for ($x=0;$x<sizeof($attachments);$x++) { $pid[$x] = $attachments[$x]["pid"]; $type[$x] = $attachments[$x]["type"]; echo "<br> PID : $pid[$x] <br> Type : $type[$x] <br>"; $attachment = quoted_printable_decode(imap_fetchbody($maillink, $z, $pid[$x])); $attach[$x] = $attachments[$x]["name"]; echo "Attach name : $attach[$x]"; $encoding[$x] = $sections[$x]["encoding"]; $attachdata[$x] = quoted_printable_decode($attachment); $attachdata[$x] = imap_base64($attachment); if ($attachdata[$x] == "") { $attachdata[$x] =$attachment; echo "<br>I'm in here !!!<br>"; } else { echo "<br>I didnt came in here !!!<br>"; } echo "<br>"; } } Btw the encoding are : 7bits, Base64 and quoted-printable Quoted-printable output correctly with the raw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php