title: SMTP configuration not working in production
body: <p>I'm trying to send an email when a form is submitted. I'm using PHPMailer to send the mail using the below configuration.</p>
  
  <pre><code>$mail = new PHPMailer;
  $mail-&gt;isSMTP();
  $mail-&gt;Host = 'mail.example.in'; 
  $mail-&gt;Port = 25; 
  $mail-&gt;SMTPAuth = true;
  $mail-&gt;Username = 'user@example.in'; 
  $mail-&gt;Password = 'password'; 
  
  $mail-&gt;setFrom("user@example.in" , "User");
  $mail-&gt;addAddress('receiver@example.in', 'Receiver');
  $mail-&gt;addBCC('anotheruser@somedomain.com', 'Another user');
  $mail-&gt;AddReplyTo('user@example.in', 'User');
  
  $mail-&gt;isHTML(true);
  
  $mail-&gt;Subject = $subject;
  $mail-&gt;Body    = $message;
  if($mail-&gt;send())
      echo "Your request has been received. We will soon contact you.";
  else echo "Unable to send your request. Please try again";
  </code></pre>
  
  <p>This works fine in localhost. But, when I deploy it to my server (example.in) I get the below exception.</p>
  
  <pre><code>SMTP ERROR: Failed to connect to server: Connection timed out (110)
  SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
  </code></pre>
  
  <p>--EDIT--</p>
  
  <p>I tried connecting to the SMTP server using telnet command, but I'm unable to add the recipient. I get the below error?</p>
  
  <pre><code>Last login: Fri Sep 16 11:08:06 on ttys000
  admin:~ admin$ telnet mail.example.in 25
  Trying 111.91.153.112...
  Connected to mail.example.in.
  Escape character is '^]'.
  220 fbs-ho-mailserver.example.in ESMTP Service (Lotus Domino Release 8.5.3FP3) ready at Fri, 16 Sep 2016 11:36:01 +0530
  HELO example.in
  250 fbs-ho-mailserver.example.in Hello example.in ([111.91.127.222]), pleased to meet you
  MAIL from: marketing@example.in
  250 marketing@example.in... Sender OK
  RCPT to: john.hh@gmail.com
  554 Relay rejected for policy reasons.
  </code></pre>
  
  <p>-- EDIT --</p>
  
  <p>I was able to setup this account in outlook. I'm really confused what's happening.</p>
  
  <p><a href="https://i.stack.imgur.com/BBh2O.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/BBh2O.jpg" alt="enter image description here"></a></p>