Forum Moderators: coopster
<?php
$name = $_REQUEST['name'] ;
$position = $_REQUEST['position'] ;
$company = $_REQUEST['company'] ;
$tel = $_REQUEST['tel'] ;
$email = $_REQUEST['email'] ;
$type = $_REQUEST['type'] ;
$guests = $_REQUEST['guests'] ;
$location = $_REQUEST['location'] ;
$comments = $_REQUEST['comments'] ;
mail( "example@gmail.com", "***Contact Us Form Results***",
"Name: $name" .
"Position: $position" .
"Company: $company" .
"Phone Number: $tel" .
"Email: $email" .
"Type of Event: $type" .
"Number of Guests: $guests" .
"Event Location: $location" .
"Comments: $comments" );
header( "Location: http://www.example.com/thankyou.html" );
?>
______
Form does not send email reply Can anyone help this is the first script ive ever written i have no clue whehe to go form here?
[edited by: eelixduppy at 5:30 pm (utc) on Dec. 28, 2007]
[edit reason] removed html [/edit]
Are you getting any errors from this script? Is your SMTP settings set correctly? Have you checked your spam or bulk folders to see if the test email has found itself there? Check these things first to see what's going on.
$to = // put in your email address
mail($to, 'TEST', 'Is this thing working?', 'From: chimp@example.com'."\r\n");
$to = // put in your email address
$send = mail($to, 'TEST', 'Is this thing working?', 'From: chimp@example.com'."\r\n");
if ($send) {
echo 'Mail is working';
}
else {
echo 'Mail not working';
}
This function will only test that mail returns with true or false. This doesnt actually mean you will get the message as there are a lot of other unknowns in the path, so mail may return true and you still not get the message. However this is getting closer to narrowing down the problem.