E-mail attachment and Exclamation point
Posted: Wed Aug 13, 2003 1:35 pm
I have a php program that reads data from a post. It takes the data, puts it into a file and mails it to me as an HTML attachment. For some reason, I get random exclamation points in different spots. It's not many, maybe 3 or 4 but I cant find a pattern. Here's what Im using:
Any ideas why Im getting "!" randomly?
thanks!
Code: Select all
################
$mime_boundary = "<<<--==+Xї".md5(time())."]";
$headers .= "From: Web Site <fddd@ddd.com>\r\n";
$headers .= "To: ddd<fdddd@dd.com>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/mixed;\r\n";
$headers .= " boundary="".$mime_boundary.""";
$message .= "This is a multi-part message in MIME format.\r\n";
$message .= "\r\n";
$message .= "--".$mime_boundary."\r\n";
$fp = fopen ($member, "r");
$file = fread($fp, filesize($member));
$filename = basename($member);
$message .= "Content-Type: text/plain; charset="iso-8859-1"\r\n";
$message .= "Content-Transfer-Encoding: 7bit\r\n";
$message .= "\r\n";
$message .= "$username needs to be updated.\r\n";
$message .= "--".$mime_boundary."\r\n";
$message .= "Content-Type: text/plain;"\r\n";
##$message .= "Content-Type: application/octet-stream;\r\n";
$message .= " name="$username.htm"\r\n";
$message .= "Content-Transfer-Encoding: quoted-printable\r\n";
$message .= "Content-Disposition: attachment;\r\n";
$message .= " filename="filename.extn"\r\n";
$message .= "\r\n";
$message .= "<html>" .$file;
$message .= "\r\n";
$message .= "--".$mime_boundary."\r\n";
$ok = mail("me@me.com", "Change Request", $message, $headers);
###############thanks!