title: PHPMailer GoDaddy Server SMTP Connection Refused
body: <p>The other day I was experiencing some problems with my GoDaddy hosted site. I called their tech support, and the person that I spoke with suggested that my problems were related to the fact that I was on a Windows box and would be better served on a Linux box. Having no opinion on this, I agreed and they switched me over.</p>
  
  <p>In the wake of that transition, my PHPMailer functionality has deserted me. I have had this working for months, so I know that my settings are accurate. I have confirmed with GoDaddy that the account I am trying to send out of has not changed from their perspective. No changes have been made on the user side (like a new password). Bottom line, the only thing that is different is that my site is now hosted on a Linux server. That's it.</p>
  
  <p>So I assume that my PHPMailer difficulties must be related to that, since it is too much of a coincidence that a script that has worked for months fails at the exact moment that the server transition occurs. But why? I spent an hour with their tech support, and they see nothing wrong with the server settings. We verified my settings (just for fun). Everything looks good, but when I send an email, I get this error:</p>
  
  <p><code>SMTP -&gt; ERROR: Failed to connect to server: Connection refused (111)SMTP Connect() failed.</code></p>
  
  <p>There are many posts about this type of error, and almost all of them relate to people getting set up for the first time who have mis-entered settings or omitted settings. However, I KNOW that my settings are complete and accurate since I've been using them successfully for months. I'll post them here just for completeness:</p>
  
  <pre><code>$mail = new PHPMailer();
  $mail-&gt;IsSMTP();  //telling the class to use SMTP
  $mail-&gt;isHTML(true);
  $mail-&gt;Host         = "smtpout.secureserver.net"; //also tried "relay-hosting.secureserver.net"
  $mail-&gt;WordWrap     = 50;
  $mail-&gt;SMTPAuth     = true;
  $mail-&gt;SMTPSecure   = "ssl";
  $mail-&gt;Port         = 465;
  $mail-&gt;Username     = "example@email.com";
  $mail-&gt;Password     = *******;
  $mail-&gt;Subject      = "Test Email";
  $mail-&gt;SMTPDebug = 1;
  </code></pre>
  
  <p>Does anyone have any ideas why this might be happening? Is there some server setting that the tech support people might not be aware of, like maybe in my php.ini file? The guy I worked with did his best to help me out, but he may just not be aware of something. </p>
  
  <p>Any help is appreciated. Let me know if there is any other information I can provide. Thanks!</p>
  
  <p>EDIT: I should also mention some of the other attempts that I made.  I get the same result no matter what.</p>
  
  <p>1) TLS with port 587
  2) Without SSL using ports 25, 80, and 3535.
  2) My own gmail address modifying the server, username, password, etc.</p>