...

View Full Version : Mailer script error



JamieR
09-07-2005, 12:49 AM
hey, yo, 'lo guten tag...

I can't seen anything immediatly obvious with this script here, but I'm getting a parse error on line 42 - any ideas anyone?



<?php

/*
Jamie Mailer version 1.5
http://www.jamierees.co.uk
Start Date: 06/09/05
Finish Date of current version: 06/09/05
*/

/*variables - change these to match your requirements*/

$name = $_POST['name'];
$email = $_POST['email'];
$body = $_POST['body'];
$Submit = $_POST['Submit'];

$emailTo = '"Jamie Rees" <jamie@jamierees.co.uk>';

$emailSubject = "Message from user at Jamierees.co.uk";

/*don't change anything under here unless you know what you're doing*/

$ip = $_SERVER['REMOTE_ADDR'];
$browser = $_SERVER['HTTP_USER_AGENT'];
$host = gethostbyaddr($_SERVER['REMOTE_ADDR']);

$emailTo = '"Jamie Rees" <jamie@jamierees.co.uk>';

$emailSubject = "Message from user at Jamierees.co.uk";

$emailBody = "name: $name\n"
. "email: $email\n"
. "body: $body\n"
. "Submit: $Submit\n"
. "IP Address: $ip\n"
. "Browser: $browser\n"
. "Host: $host\n"
. "\n"

$emailHeader = "From: $email\n"
. "Reply-To: $email\n"
. "MIME-Version: 1.0\n"
. "Content-type: text/plain; charset=\"ISO-8859-1\"\n"
. "Content-transfer-encoding: quoted-printable\n";

mail($emailTo, $emailSubject, $emailBody, $emailHeader);


header("Location: thanks.php");
exit;

?>


Thanks,

Jamie.

CrzySdrs
09-07-2005, 02:16 AM
I didn't bother to count the lines but I am guessing you needed a semicolon after this statement.



$emailBody = "name: $name\n"
. "email: $email\n"
. "body: $body\n"
. "Submit: $Submit\n"
. "IP Address: $ip\n"
. "Browser: $browser\n"
. "Host: $host\n"
. "\n";

JamieR
09-07-2005, 10:43 AM
Ah.....that seems fairly obvious now :o, cheers.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum