So, I searched Google and Stackoverflow, and I am a little surprised that I could not find this problem.
I use XAMPP / localhost and PHPmailer, sending an email to my yahoo account using my gmail email account. Everything worked fine with sending and receiving email, including an example application.
The problem is that in my browser the SERVER / CLIENT dialog box is displayed for each stage of the scene processing immediately before the message "Sent successfully".
Sample output here:
2014-02-04 05:44:36 SERVER -> CLIENT: 220 mx.google.com ESMTP xv2sm62192389pbb.39 - gsmtp 2014-02-04 05:44:36 CLIENT -> SERVER: EHLO localhost 2014-02-04 05:44:36 SERVER -> CLIENT: 250-mx.google.com at your service, [171.6.91.113] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN 250-ENHANCEDSTATUSCODES 250 CHUNKING 2014-02-04 05:44:36 CLIENT -> SERVER: AUTH LOGIN 2014-02-04 05:44:36 SERVER -> CLIENT: 334 VXNlcm5hbWU6 2014-02-04 05:44:36 CLIENT -> SERVER: a2hyZng0NDRAZ21haWwuY29t 2014-02-04 05:44:37 SERVER -> CLIENT: 334 UGFzc3dvcmQ6 2014-02-04 05:44:37 CLIENT -> SERVER: RnV0dXJlMTA= 2014-02-04 05:44:38 SERVER -> CLIENT: 235 2.7.0 Accepted . . 25 more lines of this stuff . 2014-02-04 05:44:40 CLIENT -> SERVER: QUIT 2014-02-04 05:44:40 SERVER -> CLIENT: 221 2.0.0 closing connection xv2sm62192389pbb.39 - gsmtp Message has been sent
I put line breaks to make it more readable, but it displays as one long line on the screen.
Here is the code. How can I suppress this conclusion?
require_once "../phpmailer/class.phpmailer.php"; $mail = new \PHPMailer(true); $mail->IsSMTP(); $mail->Host = "smtp.gmail.com"; $mail->Port = 465; $mail->SMTPDebug = 2; $mail->SMTPAuth = true; $mail->SMTPSecure = 'ssl'; $mail->Username = " xxx@gmail.com "; $mail->Password = "xxx"; $mail->SetFrom(' xxx@gmail.com ', 'Randy S'); $mail->WordWrap = 50; $mail->AddAddress(' xxx@yahoo.com ', 'Randy'); $mail->Subject = 'PHPMailer Test Subject'; $mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer."; $mail->AddAttachment('upload/names.txt');
php email phpmailer localhost
khrfx4
source share