0
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.

DLV
  • 553
  • 2
  • 6
  • 17
  • 1
    Did you try several mail addresses, on different servers, before you drew this conclusion? GMail is notorious for blocking mail from new SMTP servers. See: https://support.google.com/mail/answer/81126 – KIKO Software Mar 16 '18 at 12:33
  • Is this your entire configuration? Where are you defining your `host` and `port`? – IcedAnt Mar 16 '18 at 12:33

0 Answers0