Help - Search - Members - Calendar
Full Version: Simple Contact Form Failure?
Zymic Webmaster Forums > Web Design & Development > Server Side Scripting > PHP
makman99
Hello. I've created a website for a friend and I'm trying to add a contact form in php where people type in comments and click submit, and it emails to my friends email. But whenever I test it out, I get the following error:

Data has been submitted to bobshinglesband@gmail.com!
Warning: mail() [function.mail]: Mail() functionality if not on by default; please purchase this option by contacting zymic.com in /www/zxq.net/b/o/b/bobshinglesband/htdocs/mailer.php on line 14



mailer.php:
CODE
<?php
if(isset($_POST['submit'])) {

$to = "bobshinglesband@gmail.com";
$subject = "bob shingles band email!!";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];

$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";

echo "Data has been submitted to $to!";
mail($to, $subject, $body);

} else {

echo "blarg!";

}
?>


contact.php:
CODE
<center><form method="post" action="mailer.php">
Name:
<input type="text" name="name" size="19" /><br />
<br />
Email:
<input type="text" name="email" size="19" /><br />
<br />
<textarea rows="9" name="message" cols="30"></textarea>
<br />
<br />
<input type="submit" value="Submit" name="submit" />
</form></center>


Anyone know what the problem is?? Thanks
Ed
The error really says it all:

CODE
Mail() functionality if not on by default; please purchase this option by contacting zymic.com


We offer mail() functionality for a one off $10 charge, pop onto http://livechat.zymic.com and we can give you further instructions.
makman99
It's not really worth ten dollars... I can still use smtp for free can't I?
swordz
No, we don't allow outside connections as it causes too much phishing activity and spam.

Swordz
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.