title: SMTP -> ERROR: Failed to connect to server: Connection timed out (110)
body: <p>I'm getting this errors while trying to send an email via PHPMailer:</p>
  <blockquote>
  <p><strong>Deprecated:</strong> preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in <strong>/home/u722941258/public_html/old/account/access/mailer/class.phpmailer.php</strong>  on line 1727</p>
  <p>SMTP -&gt; ERROR: Failed to connect to server: Connection timed out (110)</p>
  <p>SMTP Error: Could not connect to SMTP host.</p>
  </blockquote>
  <hr />
  <p>The PHP Code:</p>
  <pre><code>function send_mail($email,$message,$subject)
      {
          require_once('mailer/class.phpmailer.php');
          $mail = new PHPMailer();
          $mail-&gt;SMTPDebug = 3;    
          $mail-&gt;isSMTP();                                      
          $mail-&gt;Host = 'smtp.sparkpostmail.com';  
          $mail-&gt;SMTPAuth = true;                               
          $mail-&gt;Username = 'USER';                 
          $mail-&gt;Password = 'SECRET';                           
          $mail-&gt;SMTPSecure = 'tls';                            
          $mail-&gt;Port = 587;                                    
          $mail-&gt;AddAddress($email);
          $mail-&gt;SetFrom('admin@email.sosgram.ga','Verificación de Cuentas');
          $mail-&gt;AddReplyTo(&quot;soporte@email.sosgram.ga&quot;,&quot;Soporte SOSgram&quot;);
          $mail-&gt;Subject  = $subject;
          $mail-&gt;MsgHTML($message);
          $mail-&gt;Send();
      }
  </code></pre>
  <p>Any solution?</p>
  <hr />
  <hr />
  <p>Hosting: <a href="http://hostinger.es" rel="nofollow noreferrer">http://hostinger.es</a></p>
  <p>SMTP: <a href="http://sparkpost.com" rel="nofollow noreferrer">http://sparkpost.com</a></p>