PHPMailer failing with ssl
<p>I'm having troubles sending an email with PHPMailer through my SMTP which is ssl enabled.</p>

<pre><code>$mail = new PHPMailer;
// HTML email!
$mail-&gt;IsHTML(true);
$mail-&gt;isSMTP();
$mail-&gt;SMTPDebug = 0;
//Ask for HTML-friendly debug output
$mail-&gt;Debugoutput = 'html';
//Set the hostname of the mail server
$mail-&gt;Host = "server.co.tz";
//Set the SMTP port number - likely to be 25, 465 or 587
$mail-&gt;Port = 465;
$mail-&gt;SMTPSecure = "ssl";
//Whether to use SMTP authentication
$mail-&gt;SMTPAuth = true;
//Username to use for SMTP authentication
$mail-&gt;Username = "xxxxxxx";
//Password to use for SMTP authentication
$mail-&gt;Password = "yyyyyyy";
</code></pre>

<p>When i run the script I get the following error:</p>

<pre><code>Mailer Error: SMTP connect() failed.
</code></pre>

<p>And on the exim4 logs:</p>

<pre><code>2016-02-24 11:02:20 TLS error on connection from [197.215.254.114] (gnutls_handshake): A TLS fatal alert has been received.
</code></pre>

<p>I have no clue on what is going wrong here.</p>

<p>I use the SMTP regurarly for my email clients and the SSL certificate is a valid one.</p>

<p>Update:</p>

<p>Got latest version and set debug to 3 but still no luck:</p>

<pre><code>Connection: opening to ssl://fsm.co.tz:465, timeout=300, options=array ()
SMTP ERROR: Failed to connect to server: (0)
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
</code></pre>