title: Unexpeceted SMTP response in ajax
body: <p>I am receiving strange response in ajax of smtp. I am using following code for smtp.</p>
  
  <pre><code>require_once 'PHPMailer/PHPMailerAutoload.php';
              $response = array();
              //Create a new PHPMailer instance
              $mail = new PHPMailer;
              $mail-&gt;isSMTP();
              $mail-&gt;SMTPDebug = 0;
              $mail-&gt;Debugoutput = 'html';
              $mail-&gt;Host = "mail.example.com";
              $mail-&gt;Port = 25;
              $mail-&gt;SMTPAuth = true;
              $mail-&gt;Username = "Y**********s@Example.com";
              $mail-&gt;Password = "Your Password";
              $mail-&gt;setFrom($to, $name);
              $mail-&gt;addAddress('O**********l@example.com', 'Owner Name');
              $mail-&gt;Subject = $subject;
              $message =  '&lt;div  style="background:#F5F5F5; padding:10px;"&gt;
                              &lt;p&gt;'.$message.'&lt;/p&gt;&lt;br /&gt;
                              &lt;div&gt;Name : '.$name.'&lt;/div&gt;&lt;br /&gt;
                              &lt;div&gt;Phone : '.$phone.'&lt;/div&gt;&lt;br /&gt;
                          &lt;/div&gt;';
              $mail-&gt;msgHTML($message);
              $mail-&gt;AltBody = 'This is a plain-text message body';
              $mail-&gt;SMTPOptions = array(
                  'ssl' =&gt; array(
                  'verify_peer' =&gt; false,
                  'verify_peer_name' =&gt; false,
                  'allow_self_signed' =&gt; true
              )
          ); 
          if (!$mail-&gt;send()){
              // For Debugging
              //return "Mailer Error: " . $mail-&gt;ErrorInfo;
              $response['error'] = 'Something not right. Please check your details.';
          }else{
              $response['success'] = 'Your email has been sent successfully.';
          }
          echo json_encode($response, JSON_PRETTY_PRINT); 
  </code></pre>
  
  <p>Above code is giving me following response when i call that page through ajax.</p>
  
  <pre><code>CLIENT -&gt; SERVER: EHLO i******9.com
  CLIENT -&gt; SERVER: STARTTLS
  CLIENT -&gt; SERVER: EHLO i******9.com
  CLIENT -&gt; SERVER: AUTH LOGIN
  CLIENT -&gt; SERVER: bm8tcmVwbHlAaWVpMjAwOS5jb20=
  CLIENT -&gt; SERVER: R29vZ2xlMDAxIQ==
  CLIENT -&gt; SERVER: MAIL FROM:&lt;i******9@gmail.com&gt;
  CLIENT -&gt; SERVER: RCPT TO:&lt;no-reply@i******9.com&gt;
  CLIENT -&gt; SERVER: DATA
  CLIENT -&gt; SERVER: Date: Thu, 9 Mar 2017 05:53:58 +0000
  CLIENT -&gt; SERVER: To: Contact Us Form &lt;no-reply@i******9.com&gt;
  CLIENT -&gt; SERVER: From: Ai******9z &lt;ii******9o@gmail.com&gt;
  CLIENT -&gt; SERVER: Subject: Bug
  CLIENT -&gt; SERVER: Message-ID: &lt;e40a0335e2698ee9e28de514c2eb325a@i******9.com&gt;
  CLIENT -&gt; SERVER: X-Mailer: PHPMailer 5.2.22 (https://github.com/PHPMailer/PHPMailer)
  CLIENT -&gt; SERVER: MIME-Version: 1.0
  CLIENT -&gt; SERVER: Content-Type: multipart/alternative;
  CLIENT -&gt; SERVER: boundary="b1_e40a0335e2698ee9e28de514c2eb325a"
  CLIENT -&gt; SERVER: Content-Transfer-Encoding: 8bit
  CLIENT -&gt; SERVER:
  CLIENT -&gt; SERVER: This is a multi-part message in MIME format.
  CLIENT -&gt; SERVER:
  CLIENT -&gt; SERVER: --b1_e40a0335e2698ee9e28de514c2eb325a
  CLIENT -&gt; SERVER: Content-Type: text/plain; charset=us-ascii
  CLIENT -&gt; SERVER:
  CLIENT -&gt; SERVER: This is a plain-text message body
  CLIENT -&gt; SERVER:
  CLIENT -&gt; SERVER:
  CLIENT -&gt; SERVER: --b1_e40a0335e2698ee9e28de514c2eb325a
  CLIENT -&gt; SERVER: Content-Type: text/html; charset=us-ascii
  CLIENT -&gt; SERVER:
  CLIENT -&gt; SERVER: &lt;div style="background:#F5F5F5; padding:10px;"&gt;
  CLIENT -&gt; SERVER: &lt;p&gt;This is for form testing&lt;/p&gt;&lt;br /&gt;
  CLIENT -&gt; SERVER: &lt;div&gt;Name : Ai******9z&lt;/div&gt;&lt;br /&gt;
  CLIENT -&gt; SERVER: &lt;div&gt;Phone : 123456789&lt;/div&gt;&lt;br /&gt;
  CLIENT -&gt; SERVER: &lt;/div&gt;
  CLIENT -&gt; SERVER:
  CLIENT -&gt; SERVER:
  CLIENT -&gt; SERVER:
  CLIENT -&gt; SERVER: --b1_e40a0335e2698ee9e28de514c2eb325a--
  CLIENT -&gt; SERVER:
  CLIENT -&gt; SERVER: .
  CLIENT -&gt; SERVER: QUIT
  { "success": "Your email has been sent successfully." }
  </code></pre>
  
  <p>Can someone please guide me what is this issue that i can fix it. I would like to appreciate if someone guide me about this issue.</p>