Simple feedback form ( 6 Views )
-
Hi
I have a simple feedback form using a sendmail.php script. Why will it not email the form to the address I put in it?
<?
//DEFINE YOUR VARIABLES
$to = "annon@home.co.uk";
$title = "Question via website";
$msg = "$message\n$name\n$telephone\n$organisation\n";
$headers = "From: $name <$email>";
$headers.= "\r\nReturn-Path: <annon@home.co.uk>";
//SEND YOUR VARIABLES USING THE MAIL FUNCTION (4 ARGUMENTS)
mail($to, $title, $msg, $headers);
header( "Location: http://www.home.co.uk/thankyou.php" );
?>
Thanks
(aa, Hong Kong)
Try putting quotes around them in the mail() call. There's no reason why that should work. Also try some error checking to see if it's a serndmail problem or server config problem.
(burcu, France)
Thanks but that just causes an error. It will email to my email address when I add it, but if I change the email address to my work, they never receive the message.
This is doing my head in!
(veysel, Bulgaria)
Can you put error checking on. Easiest way is to put ERROR_REPORTING(E_ALL) and see if it kicks up a fuss.
Also, this a personal setup or on a webhost somewhere?
(SUDE GÜL, Libyan Arab Jamahiriya)
Hi
The website is hosted on one server and our company MX records are on another server but I can't see why this would effect this script, and my Invision Board.
(bahar, Niue)
Have you checked mail logs? This is the first place I would check to see if the email is bouncing, etc. By the way, the order of operations for sendmail is internal first, then external. IOW, it looks at all the DNS records on the localhost server first and if it finds the correct domain, it won't look any farther even if the proper location for the domain is on another server. So, for instance, If your domain is hosted on another server and you are setting the domain up on this server too, then mail will always be redirected to the localhost email address for your domain instead of the actual location of the email address. This is why you are able to get mail but when you change to another email address (a domain not hosted on the localhost server) they fail to recieve it. If the MX is on another server, you may want to make sure the DNS record on THIS server points to that server...
If your server is shared, check with your hosting provider to make sure the proper path to sendmail is specified in the appropriate config files.
Aaron
(hasan hüseyin, American Samoa)
[quote='Sketch'By the way, the order of operations for sendmail is internal first, then external. IOW, it looks at all the DNS records on the localhost server first and if it finds the correct domain, it won't look any farther even if the proper location for the domain is on another server. [/QUOTE]
I never knew that, that explains a lot :p :tup:
(sarah, Hungary)
Now ya know. ;) Of course, that only applies when sending mail from that localhost server. If you're sending from any other server, the mail server info is obtained from DNS servers shich point to the other server. :)
(gamze, Morocco)
Related Topics ... (or search in 1.720.883 topics !)
simple feedback form (1) very simple feedback form (3) simple feedback form (1) simple email feedback form problem (5) form form form....yes i"m needing some simple help! (3) please help with simple feedback...please! (5) feedback wanted on a very simple page (5) not able to click into form fields of simple html form (3) feedback form... (2)
copyright © 2007-2031 Pfodere.COM ( 7 Pfoyihuee Online )
|