Mailbody as attachment!!! fixable?
Posted: Fri Aug 04, 2006 3:53 am
Currently I am building a website, and all is doing well thanks to past experiences. However somehow, I end up with a stupid problem: the email message ends up as an attachment instead of just in the body of the mail where I'd like it to be.
I allready removed the \r in the $headers on purpose, otherwise this part ended up in the message part.
What am I doing wrong?
I allready removed the \r in the $headers on purpose, otherwise this part ended up in the message part.
What am I doing wrong?
Code: Select all
$recipient="me@gmail.com";
$subject="Message from Ruben";
$body="this implies some mis-codign, why else is this in the attachment...";
$afzender="web@mydomain.nl";
$bcc="";
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text; charset=iso-8859-1\n";
$headers .= "from: Me <".$afzender.">\n";
$headers .= "reply-to: ".$afzender." \n";
//$headers .="bcc:". $bcc."\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-Mailer: Etomite PHP mailer\n";
mail($recipient, $subject, $body,$headers);
return "mail verstuurd";