Hi I'm using smtp class to send email from html form using php but it didn't work my client is not receiving any email even in junk mail and when i send the mail from my local host to my email I found it, I used the php mail function alone it didn't work
please help, the php code is:
include('SMTPconfig.php');
include('SMTPClass.php');
if($_SERVER["REQUEST_METHOD"] == "POST")
{
$to = "moh.mannaa@hotmail.com";
$from = $_POST['email'] ;
$subject = "From: contact@topkitchensco.com";
$name = $_POST['name'];
$phone = $_POST['phone'];
$body = "From:$name \n Telephone: $phone \n\n";
$body .= $_POST['message'];
$body = wordwrap($body, 120, "\n", true);
$SMTPMail = new SMTPClient ($SmtpServer, $SmtpPort, $SmtpUser, $SmtpPass, $from, $to, $subject, $body);
$SMTPChat = $SMTPMail->SendMail();
}
?>
and the configuration of the smtp of the website server is correct ( server, port, user and password)