title: What is correct settings for sending email through godaddy SMTP?
body: <p>I am using GoDaddy Professional Email (NOT Workspace Email) under Email &amp; Office. For my website, I want to email users using PHPMailer. I have used all the credentials according to GoDaddy Email Server infos.</p>
  
  <p>According to GoDaddy, the outgoing server settings are:</p>
  
  <ul>
  <li>SMTP Host : 'smtpout.secureserver.net' </li>
  <li>Port: 465</li>
  <li>Security : 'ssl'</li>
  </ul>
  
  <p>I have set my PHPMailer code as follows:</p>
  
  <pre><code>&lt;?php
  
  try
  {
      $email = new PHPMailer(TRUE);
      $email-&gt;isSMTP();
      $email-&gt;SMTPDebug = 2;
      $email-&gt;SMTPAuth = TRUE;
      $email-&gt;SMTPAutoTLS = FALSE;
      $email-&gt;SMTPSecure = "ssl";
      $email-&gt;Host = "smtpout.secureserver.net";
      $email-&gt;Port = 465;
      $email-&gt;Username = "myUserName";
      $email-&gt;Password = "MyPassword";
  
      $email-&gt;setFrom("address@from.com", "Name");
      $email-&gt;addAddress("address@to.com", "Name");
      $email-&gt;isHTML(TRUE);
      $email-&gt;Body = "My HTML Code";
      $email-&gt;Subject = "My Subject";
      $email-&gt;send();
  }
  catch (Exception $e)
  {
      // $email-&gt;ErrorInfo;
  }
  
  ?&gt;
  </code></pre>
  
  <p>The above code throwing following error:</p>
  
  <p><code>2019-08-14 10:55:58 SMTP ERROR: Failed to connect to server: Connection refused (111)
  SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting</code></p>
  
  <p>I have searched for solutions. Some Stackoverflow questions discuss about GoDaddy Workspace Email. But I am frustrated to find a solution till now. Please help me if I am doing anything wrong.</p>