Mobile app version of vmapp.org
Login or Join
Hamaas447

: 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

@Hamaas447

Posted in: #Email #Php #Ubuntu

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');
?>

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamaas447

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme