Code: Select all
<html>
<head>
<title></title>
</head>
<body>
<?php
if ($_POST['submit']=='Submit')
{
$to = "email here";
$subject = "Testing PHP on Server";
$message = "Mail is working";
$header = 'From: email here ' . "\r\n";
if(mail($to,$subject,$message,$header))
{
echo "mail sent";
}
else
{
echo "mail NOT sent";
}
}
?>
<form method="post" action="<?php $_SERVER['PHP_SELF'] ?>">
<input type="submit" value="Submit" name="submit">
</form>
</body>
</html>They recently successfully installed PHP on the server and a page with the phpinfo() function successfully displays everything about php. I don't understand where to go from here.
I know sendmail works on their SMTP since their old site used contact forms via FrontPage.
SMTP is set to localhost,
smtp_port is set to 25 (which is what they use),
and sendmail_path is set to "no value"
I'm pretty sure all that should be okay, but I could be wrong.
Anyone have any ideas please?