title: SMTP connect() failed
body: <p>Reciently, in one webpage installed in localhost, I configurated the PHPMAILER, and works perfectly. It sents the emails to my gmail account.
  But, with the same configuration, uploaded the webpage to internet, and gives "Error: SMTP connect() failed."</p>
  
  <p>I tryed alot of examples and tons of "solution answers" and it continues giving the error.</p>
  
  <p>Here is my actual configuration file:</p>
  
  <pre><code>include("mailer/class.phpmailer.php");
  include("mailer/class.smtp.php") ;
  $mail = new PHPMailer;
  
  $mail-&gt;IsSMTP(); 
  
  
  $mail-&gt;SMTPAuth   = true;                  
  $mail-&gt;SMTPSecure = "ssl";                 
  $mail-&gt;Host       = "smtp.gmail.com";      
  $mail-&gt;Port       = 465;                   
  $mail-&gt;Username   = "myemail@gmail.com";  
  $mail-&gt;Password   = "supersecurepassword";            
  $mail-&gt;SetFrom($email, $name);
  
  $mail-&gt;AddReplyTo("myemails@gmail.com","Test");
  
  $mail-&gt;Subject    = $subject;
  
  
  
  $mail-&gt;MsgHTML("Email enviado por: ".$email."&lt;br/&gt;".$contact_message);
  
  $address = "email@gmail.com";
  $mail-&gt;AddAddress($address, "pedo");
  if(!$mail-&gt;Send()) {
    echo "Mailer Error: " . $mail-&gt;ErrorInfo;
  } else {
    echo "Message sent!";
  }
  </code></pre>