title: phpmailer does not work
body: <p>I have to send a mail via Gmail, but i don't know how to configure a <code>phpmailer</code>.
  When I use <code>phpmailer</code> it gives me an error that has not been authenticated but email and password are true.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>require '../class.phpmailer.php';
  
  try {
      $mail = new PHPMailer(true);                 //New instance, with exceptions enabled
  
      $body             = file_get_contents('contents.html');
      $body             = preg_replace('/\\\\/','', $body); //Strip backslashes
  
      $mail-&gt;IsSMTP();                             // tell the class to use SMTP
      $mail-&gt;SMTPAuth   = true;                    // enable SMTP authentication
      $mail-&gt;Port       = 25;                      // set the SMTP server port
      $mail-&gt;Host       = "smtp.gmail.com";        // SMTP server
      $mail-&gt;Username   = "yuliy.x.95@gmail.com";  // SMTP server username
      $mail-&gt;Password   = "mypassword";            // SMTP server password
  
      $mail-&gt;IsSendmail();                         // tell the class to use Sendmail
  
      $mail-&gt;AddReplyTo("k.yuliy@yahoo.it","First Last");
  
      $mail-&gt;From       = "name@domain.com";
      $mail-&gt;FromName   = "First Last";
  
      $to = "k.yuliy@yahoo.it";
  
      $mail-&gt;AddAddress($to);
  
      $mail-&gt;Subject  = "First PHPMailer Message";
  
      $mail-&gt;AltBody  = "To view the message, please use an HTML compatible email viewer!";                                            // optional, comment out and test
      $mail-&gt;WordWrap = 80;                      // set word wrap
  
      $mail-&gt;MsgHTML($body);
  
      $mail-&gt;IsHTML(true);                         // send as HTML 
  
      $mail-&gt;Send();
      echo 'Message has been sent.';
  } catch (phpmailerException $e) {
      echo $e-&gt;errorMessage();
  }
  ?&gt;
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Could not execute: /var/qmail/bin/sendmail</p>
  </blockquote>