title: PHP mailer is not working for CWP ( control web panel CentOs ) email setup
body: <p>I created new email Id for domain <a href="https://www.srirangapankajam.in/" rel="nofollow noreferrer">https://www.srirangapankajam.in/</a></p>
  
  <p>Below are the email ID details.</p>
  
  <p>Email Login URL : <a href="https://server.we3.in:2031/roundcube/" rel="nofollow noreferrer">https://server.we3.in:2031/roundcube/</a></p>
  
  <p>Email Id : info@srirangapankajam.in</p>
  
  <p>Password : *******</p>
  
  <p>I try to login login using above credentials but showing server error &amp; also can't sent email using PHP library.</p>
  
  <p>I also raised big in github <a href="https://github.com/PHPMailer/PHPMailer/issues/1715" rel="nofollow noreferrer">https://github.com/PHPMailer/PHPMailer/issues/1715</a></p>
  
  <p>I used following code to send a mail.</p>
  
  <pre><code>
      $mail-&gt;SMTPDebug = 2;                                       // Enable verbose debug output
      $mail-&gt;isSMTP();                                            // Set mailer to use SMTP
      $mail-&gt;Host       = 'server.we3.in';  // Specify main and backup SMTP servers
      $mail-&gt;SMTPAuth   = true;                                   // Enable SMTP authentication
      $mail-&gt;Username   = 'info@srirangapankajam.in';                     // SMTP username
      $mail-&gt;Password   = '*****';                               // SMTP password
      $mail-&gt;SMTPSecure = 'tls';                                  // Enable TLS encryption, `ssl` also accepted
      $mail-&gt;Port       = 587;                               // TCP port to connect to
      $mail-&gt;setFrom('info@srirangapankajam.in', 'Testing');
      $mail-&gt;addAddress('siddharthundare@gmail.com'); 
      $mail-&gt;Subject = 'Here is the subject';
      $mail-&gt;Body    = 'This is the HTML message body &lt;b&gt;in bold!&lt;/b&gt;';
      $mail-&gt;AltBody = 'This is the body in plain text for non-HTML mail clients';
  
      $mail-&gt;send();   
  
  </code></pre>
  
  <p>Below error I get when try to sent mail using SMTP:</p>
  
  <p>2019-04-29 09:29:21 SERVER -> CLIENT: 220 server.we3.in ESMTP Postfix
  2019-04-29 09:29:21 CLIENT -> SERVER: EHLO localhost</p>
  
  <p>2019-04-29 09:29:21 SERVER -> CLIENT: 250-server.we3.in250-PIPELINING250-SIZE 204800000250-ETRN250-STARTTLS250-AUTH PLAIN LOGIN250-AUTH=PLAIN LOGIN250-ENHANCEDSTATUSCODES250-8BITMIME250 DSN</p>
  
  <p>2019-04-29 09:29:21 CLIENT -> SERVER: STARTTLS
  2019-04-29 09:29:21 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
  SMTP Error: Could not connect to SMTP host.</p>
  
  <p>2019-04-29 09:29:21 CLIENT -> SERVER: QUIT
  2019-04-29 09:29:21
  2019-04-29 09:29:21
  SMTP Error: Could not connect to SMTP host.</p>
  
  <p>Message could not be sent. Mailer Error: SMTP Error: Could not connect to SMTP host.</p>