I used the function on the php.net website, and it is returning that mail is sent, however I have not received a single email in testing this script on any of the emails I have tested with. What is going on?
Code: Select all
<?
function send_mail($myname, $myemail, $contactname, $contactemail, $subject, $message) {
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: php\n";
$headers .= "From: "".$myname."" <".$myemail.">\n";
return(mail(""".$contactname."" <".$contactemail.">", $subject, $message, $headers));
}
if (send_mail("username", "useremail@isp.com", "Customername", "Customer@customer.com", "This is a test")) {
print "SENT!";
} else {
print "FAILED!";
}
?>