SMTP -> ERROR: Failed to connect to server: Connection timed out (110) SMTP Error: Could not connect to SMTP host.
<p>I am using phpmailer to send email. It gives me an error. Here is the code</p>

<pre><code>$mail = new PHPMailer();
    $mail-&gt;IsSMTP(); 
    $mail-&gt;SMTPDebug  = 2;                     
    $mail-&gt;SMTPAuth   = true;                  
    $mail-&gt;SMTPSecure = "ssl";                 
    $mail-&gt;Host       = "smtp.gmail.com";      
    $mail-&gt;Port       = 465;             
    $mail-&gt;AddAddress($email);
    $mail-&gt;Username="ajaynewnew@gmail.com";  
    $mail-&gt;Password="mypassword";
    $mail-&gt;SetFrom('user@gmail.com','name');
    $mail-&gt;AddReplyTo("user95@gmail.com"," name");
    $mail-&gt;Subject    = $subject;
    $mail-&gt;MsgHTML($message);
    $mail-&gt;Send();
</code></pre>