title: Windows Apache2.2 PHP5 PHPMailer Error
body: <p>I have been reading some older questions and I haven't found yet the solution to my problem.
  Here it goes.</p>
  
  <p>I'm developing a cool website with some mail functions, limited for admin users.
  Right now I'm developing the site on localhost, but I've been provided with a Gmail account that will be used for the website.</p>
  
  <p>I've been seeking through the web and the PHPMailer module seems a good election.</p>
  
  <p>My idea is to send emails from my localhost to any other email address using the Gmail account.</p>
  
  <p>Here are the codes I'm using.
  For the Apache2.2 server</p>
  
  <pre><code>LoadModule ssl_module modules/mod_ssl.so
  </code></pre>
  
  <p>For php.ini</p>
  
  <pre><code>[mail function]
  SMTP = smtp.gmail.com
  smtp_port = 465
  sendmail_from = admins.domaing@gmail.com
  </code></pre>
  
  <p>And the php codes</p>
  
  <pre><code>&lt;?php
    date_default_timezone_set("Europe/Madrid");   
    require_once("class.phpmailer.php"); 
    $mail = new PHPMailer();
    $body             = 'It works!';
    $mail-&gt;IsSMTP();
    $mail-&gt;Host       = "smtp.gmail.com";
    $mail-&gt;SMTPDebug  = 2; 
    $mail-&gt;SMTPAuth   = true;
    $mail-&gt;SMTPSecure = "ssl";
    $mail-&gt;Host       = "smtp.gmail.com";
    $mail-&gt;Port       = 465; 
    $mail-&gt;Username   = "admins.domaing@gmail.com";
    $mail-&gt;Password   = "*********";
    $mail-&gt;SetFrom('admins.domaing@gmail.com', 'Admin');
    $mail-&gt;Subject    = "PHPMailer Test Subject via smtp (Gmail), basic"; 
    $mail-&gt;MsgHTML($body);
    $address = "user@email.com";
    $mail-&gt;AddAddress($address, "user name");
    if(!$mail-&gt;Send()) {
      echo "Mailer Error: " . $mail-&gt;ErrorInfo;
    } else {
      echo "Message sent!";
    }
  ?&gt;
  </code></pre>
  
  <p>Actually the error I'm getting is:</p>
  
  <pre><code>Invalid XML: SMTP -&gt; ERROR: Failed to connect to server: (0)
  </code></pre>
  
  <p>Any suggestions?</p>