4

I have made a successful contact form with phpmailer, however, whenever I display the thank you message , I always get this message.

SMTP -> FROM SERVER:220 mx.google.com ESMTP e2sm28679155qaw.10 - gsmtp 
SMTP -> FROM SERVER: 250-mx.google.com at your service, [##.##.###.##] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-CHUNKING 250 SMTPUTF8 
SMTP -> FROM SERVER:250 2.1.0 OK e2sm28679155qaw.10 - gsmtp 
SMTP -> FROM SERVER:250 2.1.5 OK e2sm28679155qaw.10 - gsmtp 
SMTP -> FROM SERVER:354 Go ahead e2sm28679155qaw.10 - gsmtp 
SMTP -> FROM SERVER:250 2.0.0 OK 1416161162 e2sm28679155qaw.10 - gsmtp 
SMTP -> FROM SERVER:221 2.0.0 closing connection e2sm28679155qaw.10 - gsmtp

(##.##.###.##) is where my ip address is.

Can someone please help me get rid fo this message?

Thanks.

3 Answers 3

18

Remove the following line from your phpmailer script.

$mail->SMTPDebug  = 2; 

or

// 0 = off (for production use, No debug messages)
// 1 = client messages
// 2 = client and server messages

https://github.com/PHPMailer/PHPMailer/blob/master/examples/smtp.phps

2

try this

$mail->SMTPDebug = 0; //0 = off (for production use, No debug messages) debugging: 1 = errors and messages, 2 = messages only
1
  • Can you add some explanation
    – executable
    Dec 26, 2018 at 10:48
0

comment on this line for stop receiving messages or Prevent PhpMailer from displaying messages

$mail->SMTPDebug  = 2;

from your phpmailer script.

//$mail->SMTPDebug  = 2;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.