title: Centos webpanel SMTP
body: <p>I have installed centos web panel and have set up all things. there have two sites hosted. When I try to send email using PHPmailer. there has an error. </p>
  
  <pre><code>2018-09-20 15:15:10 CLIENT -&gt; SERVER: EHLO localhost
  2018-09-20 15:15:10 SERVER -&gt; CLIENT: 250-vps203527.vps.ovh.ca250-PIPELINING250-SIZE 204800000250-ETRN250-STARTTLS250-AUTH PLAIN LOGIN250-AUTH=PLAIN LOGIN250-ENHANCEDSTATUSCODES250-8BITMIME250 DSN
  2018-09-20 15:15:10 CLIENT -&gt; SERVER: STARTTLS
  2018-09-20 15:15:11 SERVER -&gt; CLIENT: 220 2.0.0 Ready to start TLS
  SMTP Error: Could not connect to SMTP host.
  2018-09-20 15:15:11 CLIENT -&gt; SERVER: QUIT
  2018-09-20 15:15:11 
  2018-09-20 15:15:11 
  SMTP Error: Could not connect to SMTP host.
  Message could not be sent. Mailer Error: SMTP Error: Could not connect to SMTP host.
  2018-09-20 15:15:10 SERVER -&gt; CLIENT: 220 vps203527.vps.ovh.ca ESMTP Postfix
  
  $mail = new PHPMailer(true);                              // Passing `true` enables exceptions
  try {
      //Server settings
      $mail-&gt;SMTPDebug = 2;                                 // Enable verbose debug output
      $mail-&gt;isSMTP();                                      // Set mailer to use SMTP
      $mail-&gt;Host = 'vps203527.vps.ovh.ca';  // Specify main and backup SMTP servers
      $mail-&gt;SMTPAuth = true;                               // Enable SMTP authentication
      $mail-&gt;Username = 'admin@  .com';                 // SMTP username
      $mail-&gt;Password = '';                           // SMTP password
      $mail-&gt;SMTPSecure = false;                            // Enable TLS encryption, `ssl` also accepted
      $mail-&gt;Port = 25;                                    // TCP port to connect to
  
      //Recipients
      $mail-&gt;setFrom('admin@.com', 'Test Mail');
      $mail-&gt;addAddress('@gmail.com', 'Joe User');     // Add a recipient
  
      $mail-&gt;isHTML(true);                                  // Set email format to HTML
      $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();
      echo 'Message has been sent';
  } catch (Exception $e) {
      echo 'Message could not be sent. Mailer Error: ', $mail-&gt;ErrorInfo;
  }
  </code></pre>
  
  <p>This is the php code i using </p>