shizny Posted November 16, 2009 Share Posted November 16, 2009 Hello, I have a little script that is attaching a base64 encoded gif image to an email. Everything works great unless I check the email in Outlook Express. When I check it in Outlook and try to print the image the size of the image get messed up and it get cropped off the page. I've already checked printer settings etc., and can't figure out why, in Outlook, the attachment prints out so oddly. Any ideas.... Below is my php $uid = md5(uniqid(time())); $header = "From: ".$fromName." <".$fromMail.">\r\n"; $header .= "Reply-To: ".$replyTo."\r\n"; $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n"; $header .= "This is a multi-part message in MIME format.\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-type:text/plain; charset=iso-8859-1\r\n"; $header .= "Content-Transfer-Encoding: 7bit\r\n\r\n"; $header .= $message."\r\n\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-Type: image/gif\r\n"; // use diff. tyoes here $header .= "Content-Transfer-Encoding: base64\r\n"; $header .= "Content-Disposition: attachment\r\n\r\n"; $header .= $attachment."\r\n\r\n"; $header .= "--".$uid."--"; mail($emailAddress, $subject, "", $header); Quote Link to comment https://forums.phpfreaks.com/topic/181776-email-attachment-showing-up-but-printing-wrong-size/ Share on other sites More sharing options...
premiso Posted November 16, 2009 Share Posted November 16, 2009 My bet is, outlook is the culprit. Especially outlook express, that is the old version and I do not even think it is supported my M$ anymore (I could be wrong). But yea...try to see if you can google, "email images cropped outlook" and see if someone else has had similar issues... Because if the image looks fine in the email and only messes up when it is printed and it works on other email platforms, chances are OE is causing the issue. Quote Link to comment https://forums.phpfreaks.com/topic/181776-email-attachment-showing-up-but-printing-wrong-size/#findComment-958674 Share on other sites More sharing options...
shizny Posted November 16, 2009 Author Share Posted November 16, 2009 thank you very much Quote Link to comment https://forums.phpfreaks.com/topic/181776-email-attachment-showing-up-but-printing-wrong-size/#findComment-958701 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.