title: Sending emails from port 465 makes the website unresponsive - Phpmailer
body: <p>I was trying to send emails from my website which is hosted by Hostgator.
  whenever I try to send SMTP emails via any <strong>common port such as 587 or 25 the email works fine with the same code</strong>, but when I try to send using <strong>port 465 following the host settings it doesn't work</strong> and the website stops responding for few minutes on any device connecting from any other IP.</p>
  
  <p>I'm posting this since the host doesn't provide any coding help.</p>
  
  <p>below is the code:</p>
  
  <pre><code>$email = new PHPMailer();
  $email-&gt;isSMTP();
  $email-&gt;SMTPDebug = 0;
  $email-&gt;Debugoutput = 'html';
  $email-&gt;SMTPAuth = true;
  $email-&gt;Host = "gatorxxxx.hostgator.com";
  $email-&gt;Port = 465;
  $email-&gt;Username = "email@mydomain.com";
  $email-&gt;Password = "emailpassword";
  $email-&gt;setFrom('email@mydomain.com', 'Sender Name');
  $email-&gt;Subject   = 'Subject';
  $email-&gt;MsgHTML($body);
  $email-&gt;AddAddress( "useraddress" );
  $email-&gt;AddReplyTo('email@mydomain.com');
  if(!$email-&gt;Send()) {
  header("xxx");
  die ();
  } else {
  header("yyy");
  die ();
  }
  </code></pre>
  
  <p>My concern is Port 465 is for authenticated email sending, therefore it has fewer chances to land in recipient's spam folder, while using ports such as 25 or 587 might be unsafe, hence can trigger spam filters from the client side.</p>