title: phpmailer error on from email, PHP email
body: <p>Ok I've been knocking my head against a wall, more for the overall problem of send an email thru PHP while specifying a mail server...</p>
  
  <p>The solution I've made it the furthest with is phpmailer.
  If there is a lightweight VERY easy solution - please suggest it.</p>
  
  <p>here's what I have (obviously the u/p are NOT the real u/p - but they are in my code - the same account I get my gmail from in outlook, settings work FINE there...</p>
  
  <p>Im using it as a test - because the smtp settings the client gave me didn't work - so I though I'd try something that I KNEW - DID work...</p>
  
  <pre><code>&lt;?php
  require 'phpmailer/class.phpmailer.php';
  
  $mail = new PHPMailer();
  $mail-&gt;IsSMTP();
  $mail-&gt;SMTPDebug = 2;
  $mail-&gt;Debugoutput = 'html';
  $mail-&gt;Host = "smtp.gmail.com";
  $mail-&gt;Port = 465;
  $mail-&gt;SMTPAuth = true;
  $mail-&gt;Username = "me@myDomain.com";
  $mail-&gt;Password = "myPassword";
  $mail-&gt;SetFrom('me@myDomain.com', 'James Test');
  $mail-&gt;AddAddress('me@yahoo.com', 'John Doe');
  $mail-&gt;Subject = 'PHPMailer SMTP test';
  $mail-&gt;MsgHTML( 'This is a test' );
  
  //Send the message, check for errors
  if( !$mail -&gt; Send() ) {
  echo "Mailer Error: " . $mail-&gt;ErrorInfo;
  } else {
  echo "Message sent!";
  }
  ?&gt;
  </code></pre>
  
  <p>The error I'm getting</p>
  
  <pre><code>SMTP -&gt; FROM SERVER:
  CLIENT -&gt; SMTP: EHLO dev.nps.com
  SMTP -&gt; FROM SERVER:
  SMTP -&gt; ERROR: EHLO not accepted from server:
  CLIENT -&gt; SMTP: HELO dev.nps.com
  SMTP -&gt; FROM SERVER:
  SMTP -&gt; ERROR: HELO not accepted from server:
  CLIENT -&gt; SMTP: AUTH LOGIN
  SMTP -&gt; ERROR: AUTH not accepted from server:
  SMTP -&gt; NOTICE: EOF caught while checking if connected
  The following From address failed: me@myDomain.com : Called Mail() without being connected
  Mailer Error: The following From address failed: me@myDomain.com : Called Mail() without being connected
  </code></pre>
  
  <p>The dev.nps.com is simply a 'fake' domain I put in my host file, so i can distinguish my projects and not use 127.0.0.1 for everything... it's not specified in the code - so I'm not sure what's going on there, but the error seems to balk at the 'from email'... which again is weird because it shouldn't matter</p>
  
  <p>Thanks for any help - </p>