Article 57JWX Ubuntu server, my contact form on website is not working

Ubuntu server, my contact form on website is not working

by
master
from LinuxQuestions.org on (#57JWX)
Hi, My website was hosted on a GoDaddy Windows server and I had a working contact form which was great.

I have now got that website up and running on GoDaddy's Gen4 VPS Ubuntu 16.04

The problem is my contact form is throwing an error Cannot POST /mail.php

mail.php is referring to the php file my html file checks

PHP Code:<?php $name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$formcontent="From: $name \n Message: $message";
$recipient = "My Email Here";
$subject = "My Email Subject Here";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>I dont believe the PHP to be at fault. I believe I simply need to set something else up on the server. I have PHP-V 7.0.33 installed running apache.

Im hoping someone has had this same issue and can help out. Basically I just need to get my contact form working.

Thanks.latest?d=yIl2AUoC8zA latest?i=4NauiwRY3o8:C8i9kLeYC10:F7zBnMy latest?i=4NauiwRY3o8:C8i9kLeYC10:V_sGLiP latest?d=qj6IDK7rITs latest?i=4NauiwRY3o8:C8i9kLeYC10:gIN9vFw4NauiwRY3o8
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments