Webform not working on site - no emails sent

I have a web form on my site that when you fill it in does not send the email to me inspite setting it up to send them to me. can anyone help?
Thanks

  1. Please make sure you have enabled mail sending: cPanel > Settings > General > Sendmail > On

  2. Please make sure you have not exceeded mail sending quota (50 emails/day)

  3. Please make sure your mail() function supplies headers as well. Use this code instead:

<?php

$to = "somebody@example.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: webmaster@example.com" . "\r\n" .
"CC: somebodyelse@example.com";

mail($to, $subject, $txt, $headers);

?>

Replace the variables with proper values :wink:

HI. Thank you for your response. I can confirm sendmail is on. I am using a template provided by 000webhost so I have not recoded anything.

Its working now, my email settings were not correct on the form! Thanks

1 Like