我被困住了,无法弄清楚为什么这不起作用。它以前工作过。出于安全原因,我已更改以下电子邮件地址。
$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.";
};