Jump to content

email attachment showing up but printing wrong size


shizny

Recommended Posts

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);

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.