I am stuck and cannot figure out for the life of me why this is not working. It was working before. I have changed the emails addresses below for security reasons.
$to = "email@domainname.com";
$subject = "Submission";
$body = "Test Body";
$header = "From: email@domainname.com";
if (mail($to, $subject, $body, $header)) {
echo "message was successfully sent.";
echo "$to $subject <br/> $body <br/> $header";
} else {
echo "There was a Problem.";
};