..:: what am I doing wrong ???::..


#1

I use this php script to send a short email and jpg attachment. the problem is it will not show the picture. When sent to yahoo, hotmail, outlook, it shows the message but there is a red x showing where the image should go…

here is the script: //////

<?PHP $to = meagain@yahoo.comrn"; $headers .= "MIME-Version: 1.0rn" ."Content-Type: multipart/mixed; boundary="$bound_text""; $message .= "If you can see this MIME then your email doesn't accept MIME types!rn" .$bound; $message .= "Content-Type: text/html; charset="iso-8859-1"rn" ."Content-Transfer-Encoding: 7bitrnrn" ."hey my good friend here is a picture of regal beaglern" .$bound; $file = file_get_contents("http://www.yerka.pl/Yerka-pic-Images/nauka_chodzenia.jpg"); $message .= "Content-Type: image/jpg; name="nauka_chodzenia.jpg"rn" ."Content-Transfer-Encoding: base64rn" ."Content-disposition: attachment; file="nauka_chodzenia.jpg"rn" ."rn" .chunk_split(base64_encode($file)) .$bound_last; if(mail($to, $subject, $message, $headers)) { echo 'MAIL SENT'; } else { echo 'MAIL FAILED'; } ?>

// please help :-? :-?