PDA

View Full Version : php parse error



zoobie
June 7th, 2002, 22:10
I'm getting an parse error on the mail() line...the last line of the following code. I've tried every mcombo I can think of to get it to send. I'm evidently missing something.

Anyone want to take a shot?

Thanks



<?PHP

$headers .= "To:$receiver\" \n";
$headers .= "From:Graphix and Sound <me@you.com>\" \n";
$headers .= "Subject:You order has arrived!\" \n";
$headers .= "MIME-Version: 1.0\" \n" ;
$headers .= "Content-Type: multipart/related\";
type=\"multipart/alternative\";
boundary=\"----=_NextPart_000_0050_01C20DE0.47BD0300\" \n";
$headers .= "X-Priority: 3\" \n";
$headers .= "X-MSMail-Priority: Normal\" \n";
$headers .= "X-Mailer: General Kinetics\" \n";
$headers .= "This is a multi-part message in MIME format.\" \n";

$boundary="------=_NextPart_000_0050_01C20DE0.47BD0300\" \n";
$headers .= "Content-Type: multipart/alternative\";
boundary=\"----=_NextPart_001_0051_01C20DE0.47BD0300\" \n";


$boundary="------=_NextPart_001_0051_01C20DE0.47BD0300";
$headers .= "Content-Type: text/plain\";
charset=\"iso-8859-1\" \n";
$headers .= "Content-Transfer-Encoding: quoted-printable";

$message_n="$message";

$boundary="------=_NextPart_001_0051_01C20DE0.47BD0300";
$headers .= "Content-Type: text/html;
charset=\"iso-8859-1\" \n";
$headers .= "Content-Transfer-Encoding: quoted-printable";

$message_n="<HTML><HEAD>
</HEAD><BODY bgColor=3D#ffffff><BGSOUND SRC=\"cid:1101mysound1101z\">
<br>
<center><IMG SRC=\"cid:1101myimage1101z\"></center>
<br>
<font face=tahoma size=4 color=red>$message</font></BODY></HTML>";

$boundary="------=_NextPart_001_0051_01C20DE0.47BD0300--";

$boundary="------=_NextPart_000_0050_01C20DE0.47BD0300";
$headers .= "Content-Type: image/gif;
name=\"$pic.gif\" \n";
$headers .= "Content-Transfer-Encoding: base64\" \n";
$headers .= "Content-Disposition: inline filename=\"$pic.gif\" \n";
$headers .= "Content-ID:1101myimage1101z"


$boundary="------=_NextPart_000_0050_01C20DE0.47BD0300";
$headers .= "Content-Type: audio/wav;
name=\"$sound.wav\" \n";
$headers .= "Content-Transfer-Encoding: base64\" \n";
$headers .= "Content-Disposition: inline filename=\"$sound.wav\" \n";
$headers .= "Content-ID:1101mysound1101z"


$boundary="------=_NextPart_000_0050_01C20DE0.47BD0300--"

mail($receiver,$subject,$message_n,$headers);

?>

dragonhawk
June 8th, 2002, 02:10
mail($recipient, $subject, $message, $headers);

You forgot the $message?

zoobie
June 8th, 2002, 03:15
Well, not really. I've tried it every which way. That version just happened to not have it. I've revised the question now so it includes it.

It's still throwing a parse error on the last line with mail() :confused2

hohoho
June 8th, 2002, 03:38
you forgot the ; in the line before

hohoho
June 8th, 2002, 03:43
Originally posted by zoobie



$boundary="------=_NextPart_000_0050_01C20DE0.47BD0300--" <------- ;

mail($receiver,$subject,$message_n,$headers);


that's what i tried to explain in the last thread :D

zoobie
June 8th, 2002, 06:16
Got it! Thanks :rolleyes: