Sending an email using mail()
Posted: Mon Jul 23, 2007 10:13 am
Hi,
I have used mail() plenty of times before and it has worked fine.
I am using it now and it works very well except for one domain (my own email address).
It is a 'contact us' form I have made and I have sent test messages to various email accounts and it works well except for my own domain.
I have got onto my email maintenance people and they have asked:
"Do you know how the emails are sent out, is it mapped to a SMTP account, or IMAP etc…"
Here is the code for sending the message:
Any ideas/suggestions?
I have used mail() plenty of times before and it has worked fine.
I am using it now and it works very well except for one domain (my own email address).
It is a 'contact us' form I have made and I have sent test messages to various email accounts and it works well except for my own domain.
I have got onto my email maintenance people and they have asked:
"Do you know how the emails are sent out, is it mapped to a SMTP account, or IMAP etc…"
Here is the code for sending the message:
Code: Select all
$to = "nick@q2q.co.uk";
$subject = "Message from Q2Q web site";
$message = $guestMsg;
//CHECK GUEST CONTACT PREFERENCE
if($guestByTel==1)
{
$message .= "<br /><br /><span style=\"font-weight:bold;\">" . $guestName . " has made a request to be contacted by telephone.</span>";
}
$from = $guestEmail;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\r\n";
$headers .= "From: " . $from . "\r\n";
$headers .= "Reply-To: " . $from . "\r\n";
mail($to,$subject,$message,$headers);