-
A simple problem with forms
Hello all. I’ve recently tried my hand at building a form in Dreamweaver(I know, I said this was simple stuff, right?). This is obviously the easy part – getting some CGI to actually deal with the form data is proving very, very tricky (at least for me..). I’m trying to post the information to a php file, which then should send an e-mail to a gmail account. There’s a hitch somewhere, but I’m not sure what it is.
The page with the form is:
https://www.votemia.com/volunteer/
The PHP code, on the file contact.php, is:
co***************@***il.com";
$subject = "Volunteer Request";
$name = $_REQUEST['name'];
$email = $_REQUEST['email'] ;
$phone = $_REQUEST['phone'];
$yesnewsletter = $_REQUEST['yesnewsletter'];
$event = $_REQUEST['event'];
$admin = $_REQUEST['admin'];
$sign = $_REQUEST['sign'];
$comments = $_REQUEST['comments'] ;
$headers = "From: $email" . "\r\n";
$headers .= "Phone : $phone" . "\r\n";
$headers .= "Newsletter : $yesnewsletter" . "\r\n";
$headers .= "Host an event : $event" . "\r\n";
$headers .= "Administrative work : $admin" . "\r\n";
$headers .= "Hold a sign : $sign" . "\r\n";
$headers .= "Comments : $phone" . "\r\n";
$sent = mail($to, $subject, $comments, $headers) ;
if($sent)
{print "Your mail was sent successfully"; }
else
{print "We encountered an error sending your mail"; }
?>When I try to post the form, I get this error message:
Warning: mail() [function.mail]: SMTP server response: 550 <co***************@***il.com> No such user here in E:\inetpub\vhosts\votemia.com\httpdocs\contact.php on line 19
We encountered an error sending your mailThanks for any guidance/help/advice!