Grrrr! How can I get this code working?

natewex

Power Member
Joined
Sep 22, 2009
Messages
619
Reaction score
135
Want a basic fill out form on a site Im doing.

http://www.freecontactform.com/email_form.php

Have pasted the first lot of code into my contact form and its showing up just fine.

The second lot of code, the php, seems to be working on my site also (e.g. I fill out the form, click send and get the thank you for submitting page) -- BUT the mail doesnt come through to my inbox!

I have put my email in the first paragraph in the php:

// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "[email protected]";
$email_subject = "Your email subject line";

... and filled out the subject line also. But it still doesnt work!

Do I have to edit something here:

// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
?>

Thanks guys!
 
Not trying to be a smart a$$,but did you check to see if your spam filter caught it. I use this same service and I have no problem.

Also, I am one of those who did not check my spam filter too!!! I learned by experience.
 
i dont have a spam filter dude!
Posted via Mobile Device
 
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
?>

If I were you I would try to remove the @ symbol before mail. That symbol blocks the warnings that may be returned from the function. If you remove it and try again you hopefully will get a warning and hopefully we can help from there.
 
Warning: mail() has been disabled for security reasons in *************************.ie/send_form_email.php on line 73


Any ideas?
 
Well your host may have disabled the mail() function. If this is the case you would have to ask them to enable it for you. If that is not the case then I would have to do more research lol.

This site has instructions on how to tell if the functions is disabled:
hxxp://drupal.org/node/214402
 
lol is that the reason? Actually doing it for a client of a friend and he has his own server. That the prob then?
 
Back
Top