title: PHPMailer gives error "DATA END command failed" and "data not accepted" without further error explanation
body: <p>I have tried to send email with this code (SMTP_HOST etc. are constants defined in config, they are all defined, it uses port 587):</p>
  
  <pre><code>    $txt = strip_tags(str_replace(array("&lt;br&gt;","&lt;br\&gt;","&lt;br \&gt;"),"\n",$this-&gt;_params['message']));
      // some irrelevant code here (saves record)
      $mail = new PHPMailer;
      $mail-&gt;isSMTP();
      $mail-&gt;Host = SMTP_HOST;
      $mail-&gt;Port = SMTP_PORT;
      $mail-&gt;SMTPAuth = true;
      $mail-&gt;Username = $mail-&gt;From = SMTP_USER;
      $mail-&gt;Password = SMTP_PASS;
      $mail-&gt;addReplyTo($this-&gt;_params['email'], $this-&gt;_params['name']);
      $mail-&gt;From = MAIL_FROM;
      $mail-&gt;FromName = MAIL_FROM_NAME;
      $mail-&gt;addAddress(MAIL_TO);
      $mail-&gt;Body = str_replace("\n","&lt;br/&gt;\n",$this-&gt;_params['message']);
      $mail-&gt;AltBody = $txt;
      $mail-&gt;Subject = MAIL_SUBJECT.$this-&gt;_params['subject'];
      $mail-&gt;isHTML (true);
      $mail-&gt;SMTPDebug = 3;
      $ok = $mail-&gt;send();
  </code></pre>
  
  <p>With PHPMailer version 5.2.7.</p>
  
  <p>Debug info that I receive (I **** any private data):</p>
  
  <pre><code>2014-07-04 13:57:38 Connection: opening
  2014-07-04 13:57:38 Connection: opened
  2014-07-04 13:57:38 SERVER -&gt; CLIENT: 220 **** ESMTP Exim 4.82 Fri, 04  Jul 2014 15:57:38 +0200
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: EHLO ****
  2014-07-04 13:57:38 SERVER -&gt; CLIENT: 250-**** Hello **** [****]
  250-SIZE 20971520
  250-8BITMIME
  250-PIPELINING
  250-AUTH PLAIN LOGIN
  250-STARTTLS
  250 HELP
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: AUTH LOGIN
  2014-07-04 13:57:38 SERVER -&gt; CLIENT: 334 ****
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: ****
  2014-07-04 13:57:38 SERVER -&gt; CLIENT: 334 ****
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: ****
  2014-07-04 13:57:38 SERVER -&gt; CLIENT: 235 Authentication succeeded
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: MAIL FROM:&lt;****&gt;
  2014-07-04 13:57:38 SERVER -&gt; CLIENT: 250 OK
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: RCPT TO:&lt;****&gt;
  2014-07-04 13:57:38 SERVER -&gt; CLIENT: 250 Accepted
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: DATA
  2014-07-04 13:57:38 SERVER -&gt; CLIENT: 354 Enter message, ending with "." on a line by itself
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: Date: Fri, 4 Jul 2014 15:57:38 +0200
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: To: ****
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: From: Automat SNC &lt;****&gt;
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: Reply-To: **** &lt;****@koszmail.pl&gt;
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: Subject: ****: Contact-form Test test test
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: Message-ID: &lt;ff1fbff844bf01ff24f5575e9e362ef1@****&gt;
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: X-Priority: 3
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: X-Mailer: PHPMailer 5.2.7(https://github.com/PHPMailer/PHPMailer/)
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: MIME-Version: 1.0
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: Content-Type: multipart/alternative;
  2014-07-04 13:57:38 CLIENT -&gt; SERVER:   boundary="b1_ff1fbff844bf01ff24f5575e9e362ef1"
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: Content-Transfer-Encoding: 8bit
  2014-07-04 13:57:38 CLIENT -&gt; SERVER:
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: --b1_ff1fbff844bf01ff24f5575e9e362ef1
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: Content-Type: text/plain; charset=us-ascii
  2014-07-04 13:57:38 CLIENT -&gt; SERVER:
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: Test test test
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: test test test test
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: test
  2014-07-04 13:57:38 CLIENT -&gt; SERVER:
  2014-07-04 13:57:38 CLIENT -&gt; SERVER:
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: --b1_ff1fbff844bf01ff24f5575e9e362ef1
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: Content-Type: text/html; charset=us-ascii
  2014-07-04 13:57:38 CLIENT -&gt; SERVER:
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: Test test test
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: &lt;br/&gt;
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: test test test test
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: &lt;br/&gt;
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: test
  2014-07-04 13:57:38 CLIENT -&gt; SERVER:
  2014-07-04 13:57:38 CLIENT -&gt; SERVER:
  2014-07-04 13:57:38 CLIENT -&gt; SERVER:
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: --b1_ff1fbff844bf01ff24f5575e9e362ef1--
  2014-07-04 13:57:38 CLIENT -&gt; SERVER:
  2014-07-04 13:57:38 CLIENT -&gt; SERVER: .
  2014-07-04 13:57:48 SERVER -&gt; CLIENT:
  2014-07-04 13:57:48 SMTP ERROR: DATA END command failed:
  SMTP Error: data not accepted.
  2014-07-04 13:57:48 CLIENT -&gt; SERVER: QUIT
  2014-07-04 13:57:49 SERVER -&gt; CLIENT: 250 OK id=1X33ze-0007GO-Nc
  2014-07-04 13:57:49 SMTP ERROR: QUIT command failed: 250 OK id=1X33ze-0007GO-Nc
  2014-07-04 13:57:49 Connection: closed
  </code></pre>
  
  <p>Can someone give me a hint what can be wrong here?</p>