Hi all.. I'm new to web dev.. and I'm trying to build a PHP contact form.. but it's failing at the very end with the following error:
"Warning: mail(): SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in D:\folder\myusername\codewizz.com\do_sendfeedback.php on line 11"
Here's my code:
<?php
$msg = "Sender's Name: \t $_POST[sender_name]\n";
$msg .= "Sender's Email: \t $_POST[sender_email]\n";
$msg .= "Did you like the site? \t $_POST[like_site]\n";
$msg .= "Additional Message: \t $_POST[message]\n\n";
$mailheaders = "From: my website <webmaster@codewizz.com>\n";
$mailheaders .= "Reply-to: $sender_email\n\n";
mail("myworkingemail@mydomain.com", "Feedback form", $msg, $mailheaders);
echo "<H1 align=center>Thank you, $_POST[sender_name]</H1>";
echo "<P align=center>We appreciate your feedback.</P>";
?>
I think that I have to specify an SMTP server for this to work?
I believe it may be mail.codewizz.com, but i'm not positive.. I can always find out from my host.
Is there anyway I can specify that SMTP server within the code without having to include other files ?
Or what's the easiest way to do this?
Thanks in advance!