title: phpMailer not sending mail, ErrorInfo is empty
body: <p>I'm designing a simple Contact Us form using phpMailer.  The data is passed to the PHP     correctly, but then the email is never sent.  I tried looking at the error info, but it's empty.  Any thoughts?  Thanks in advance!</p>
  
  <pre><code>&lt;?php
  
      require_once('email/mail/class.phpmailer.php');
  
      $email_to = 'myEmail';
      $email_subject = 'Contact form';    
  
      $fname = $_POST['firstname'];
      $lname = $_POST['lastname'];
      $email = $_POST['email'];
      $dob = $_POST['dob'];
      $subject = $_POST['subject'];
      $comments = $_POST['comments'];
  
      $mailer = new PHPMailer(true);
      $mailer-&gt;Host = '**********';
      $mailer-&gt;Username = '********';
      $mailer-&gt;Password = '*********';
      $mailer-&gt;SMTPAuth = true;
      $mailer-&gt;AddAddress($email_to);
      $mailer-&gt;SMTPDebug = false;
      $mailer-&gt;IsSMTP();
      $mailer-&gt;FromName = 'Contact Page';
      $mailer-&gt;From = "**********";
      $mailer-&gt;Sender = '**********';
      $mailer-&gt;Subject = $email_subject;
      $mailer-&gt;Body = "
          Source: Contact Page
          Name: ".$fname. " ".$lname."
          Email: ".$email."
          Date of Birth: ".$dob."
          Subject: ".$subject."
          Comments: ".$comments;
  
      echo "Data received";
  
      if(!$mailer-&gt;Send()) {
          echo 'Message was not sent.';
          echo 'Mailer error: ' . $mail-&gt;ErrorInfo;
      } else {
          echo 'Message has been sent.';
      }
  
  ?&gt;
  </code></pre>
  
  <p>Output is:</p>
  
  <pre><code>Data receivedMessage was not sent.Mailer error: 
  </code></pre>
  
  <p>Output of <code>print_r($mailer)</code>:</p>
  
  <pre><code>PHPMailer Object ( 
      [Priority] =&gt; 3 
      [CharSet] =&gt; iso-8859-1 
      [ContentType] =&gt; text/plain 
      [Encoding] =&gt; 8bit 
      [ErrorInfo] =&gt; 
      [From] =&gt; contact@blah.com 
      [FromName] =&gt; Contact Page 
      [Sender] =&gt; contact@blah.com 
      [Subject] =&gt; Contact form 
      [Body] =&gt; 
          Source: blah 
          Name: Derp McDerpson 
          Email: derpallday@gmail.com 
          Date of Birth: 1/1/2000 
          Subject: The things! 
          Comments: fix them 
      [AltBody] =&gt; 
      [WordWrap] =&gt; 0 
      [Mailer] =&gt; smtp 
      [Sendmail] =&gt; /usr/sbin/sendmail 
      [PluginDir] =&gt; 
      [Version] =&gt; 1.73 
      [ConfirmReadingTo] =&gt; 
      [Hostname] =&gt; 
      [Host] =&gt; mail.authsmtp.com 
      [Port] =&gt; 25 
      [Helo] =&gt; 
      [SMTPAuth] =&gt; 1 
      [Username] =&gt; blah 
      [Password] =&gt; blah 
      [Timeout] =&gt; 10 
      [SMTPDebug] =&gt; 
      [SMTPKeepAlive] =&gt; 
      [smtp] =&gt; 
      [to] =&gt; Array ( 
          [0] =&gt; Array ( 
              [0] =&gt; blah@blah.com 
              [1] =&gt; blah 
          ) 
      ) 
      [cc] =&gt; Array ( ) 
      [bcc] =&gt; Array ( ) 
      [ReplyTo] =&gt; Array ( ) 
      [attachment] =&gt; Array ( ) 
      [CustomHeader] =&gt; Array ( ) 
      [message_type] =&gt; 
      [boundary] =&gt; Array ( ) 
      [language] =&gt; Array ( ) 
      [error_count] =&gt; 0 
      [LE] =&gt; 
  )
  </code></pre>