PHP mailer class is not working in windows server [duplicate]

This question already has an answer here:

I hosted My website on windows server 8 wamp server.And i am using phpmailer class for sending email through the website.But email is not sending from server.
Here is the code I’m using


$objCommon      = new common();
$objSettings    = new settings();
$objContactUs   = new contact_us();
$mail           = new PHPMailer();
$body = 'body of the mail';//email body here

$mail->CharSet = 'UTF-8';
$address = '';//email to;

$mail->Subject    = "subject"; 

$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test


This code is perfectly working in linux server, but my client have windows server 8 and wamb. I think I’m missing something in server side section

Source: wampserver

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.