i have a php mailer, that send an attachment. its working great in gmail, but in yahoo mail, instead of seeing the thumbnail image of the attachment i see ÿØÿà but i am able to download/view the attachment fine. what can be causing this? in gmail, i can see/view the thumbnail attachment fine
$headers .= "Message-ID: <".$now." TheSystem@".$_SERVER['SERVER_NAME'].">".$eol;
$headers .= "X-Mailer: PHP v".phpversion().$eol; // These two to help avoid spam-filters
# Boundry for marking the split & Multitype Headers
$mime_boundary=md5(time());
$headers .= 'MIME-Version: 1.0'.$eol;
$headers .= "Content-Type: multipart/related; boundary=\"".$mime_boundary."\"".$eol;
# Text Version
$msg .= "--".$mime_boundary.$eol;
$msg .= "Content-Type: text/plain; charset=iso-8859-1".$eol;
$msg .= "Content-Transfer-Encoding: 8bit".$eol;
$msg .= "This is a multi-part message in MIME format.".$eol;
$msg .= "Congratulations! You have just received a FREE coupon! Please download and print the attached coupon and bring it with you to your next visit. If you are unable to view the attachment, please go to http://www.freeformfit.com/classes-training/".$f_name .$eol;
$msg .= "Thanks, and we look foward to seeing you!".$eol;
# Attachment
$msg .= "--".$mime_boundary.$eol;
$msg .= "Content-Transfer-Encoding: base64".$eol;
$msg .= "Content-Disposition: attachment; filename=\"".$letter."\"".$eol.$eol; // !! This line needs TWO end of lines !! IMPORTANT !!
$msg .= $f_contents.$eol.$eol;
# Setup for text OR html
# Finished
$msg .= "--".$mime_boundary."--".$eol.$eol; // finish with two eol's for better security. see Injection.
# SEND THE EMAIL
ini_set(sendmail_from,'adam@freeformfit.com'); // the INI lines are to force the From Address to be used !
mail($emailaddress, $emailsubject, $msg, $headers);
ini_restore(sendmail_from);