Form to Mail Script/Server Issue

OK, here’s the set up; the website is on my VPS, the email is held on the hosts server (an Exchange Mailbox). And here’s the problem; the enquiry/contact forms are not sending the mail, or rather they say they are…but it’s not being received.

My hosting company tell me I need to “edit your scripts so they are sending e-mails via the local machine on the IP/Host of 127.0.0.1 instead of going via smtp.fasthosts.co.uk.” Trouble is I don’t have a clue how to do that, and they are less than helpful in going any further.

Anyone got any idea??

Try using the mail() function

something quick
[php]
$to = "[email protected]";
$subject = “Test mail”;
$message = “Hello! This is a test email.”;
$from = "[email protected]";
$headers = “From:” . $from;
mail($to,$subject,$message,$headers);
echo “Mail Has Been Sent By Mail Function.”;
[php]

instead of smtp

Sponsor our Newsletter | Privacy Policy | Terms of Service