title: SMTP Error Issue - PHPMailer
body: <p>I have a daily newsletter I send out to a list of people each day. I use PHP and the PHPMailer object to send the emails.</p>
  
  <p>This has been working fine up until today when I didn't get an email (test) and I checked the logs to find that intermittently I was getting SMTP errors back from </p>
  
  <pre><code>mail-&gt;Send();
  </code></pre>
  
  <p>Method of the class on SOME of the people - not all of them.</p>
  
  <p>All of the emails were exactly the same size (length in characters) apart from their name and email address.</p>
  
  <p>The error details from </p>
  
  <pre><code>$mail-&gt;ErrorInfo;
  </code></pre>
  
  <p>Included these two errors</p>
  
  <p>SMTP Error: Data not accepted.&lt;p&gt;SMTP server error: 2.1.5 Ok  </p>
  
  <p>SMTP Error: Data not accepted.&lt;p&amp;gtSMTP server error: &lt;/p&gt;</p>
  
  <p>Why there are broken P tags in the error message I have no idea - also why the first error has OK in it??</p>
  
  <p>However other people in the loop had emails go out fine.</p>
  
  <p>Also when I put the script into test mode so ONLY these failures were emailed out (so one call of the script = one email to one person), I found no problem and the people got their emaail.</p>
  
  <p>Now I asked tech support what the error meant and got back "Google it" and I can't find the error 2.1.5 OK anywhere. I don't really get why it says OK after an error either.</p>
  
  <p>As a test for tomorrow I put a test in for a failed Send and then a Sleep for 5 seconds with a retry.</p>
  
  <p>I don't know if this will help but I thought that maybe my SMTP server which is on the same server as my script (Rackspace VPS Linux) was having temporary issues connecting so a sleep might be handy in this situation.</p>
  
  <p>This is the first time I have had this issue, I haven't rebooted APACHE or my server (or mailserver) and before this script I had another one send out 403 emails without any problem.</p>
  
  <p>It would be nice to know what the error is and why it happened though.</p>
  
  <p>Rob</p>