require_once 'PHPMailer/class.phpmailer.php';
$mail->From = $address;
$mail->FromName = $name;
//To address and name
$mail->addAddress("example92@gmail.com", "Mr Example");
//Address to which recipient will reply
$mail->addReplyTo($address, $name);
//Send HTML or Plain Text email
$mail->Subject = "Sent from example.in";
$mail->Body = htmlentities($msg);
I am using IIS as a server where my SMTP configurations are set. With my code the its showing that its not throwing any error and $mail-send() works fine only the mail is not delivered to the inbox.