: Why is my Ubuntu server not sending emails from my website visitors through PHP? I have hosted my website on my Ubuntu server. I have added an email forum on my website so visitors can send
I have hosted my website on my Ubuntu server. I have added an email forum on my website so visitors can send emails to me. But it is not working anymore. Here's the full php code
<?php
$errors = '';
$myemail ='my@email.com';//<-----Put Your email address here.
$name = $_POST['name'];
$message = $_POST['message'];
$to = $myemail;
$email_subject = "Contact form submission: $name";
$email_body = "You have received a new message. ".
" Here are the details:n Username: $name n $email_address n Password: n $message";
$headers = "From: $myemailn";
$headers .= "Reply-To: $email_address";
mail($to,$email_subject,$email_body,$headers);
//redirect to the 'thank you' page
header('Location: example.com/thanks.html');
?>
More posts by @Hamaas447
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.