I am sending OTP through email in PHPMailer. everything is working fine but i am getting debug information in the page like this:
SERVER -> CLIENT: 220 smtp.gmail.com ESMTP y14-20020a056a001c8e00b004fa829db45csm8785422pfw.218 - gsmtp
CLIENT -> SERVER: EHLO localhost
SERVER -> CLIENT: 250-smtp.gmail.com at your service, [49.34.88.171]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
CLIENT -> SERVER: AUTH LOGIN
SERVER -> CLIENT: 334 VXNlcm5hbWU6
'
'
'
CLIENT->SERVER :MORE INFORMATION
I used $mail->SMTPDebug = 0;
but still showing debug infromation.
$mail = new PHPMailer(true);
$mail->SMTPDebug = 0;
anything i am missing that i should know?
CodePudding user response:
I Dhaval, as bruner said, just writing $mail->SMTPDebug = SMTP::DEBUG_OFF;
or $mail->SMTPDebug = 0;
should be work
Are you sure that $mail is the only one PHPMailer instance created?
CodePudding user response:
SMTP::DEBUG_OFF (0):
Use this, this can disable debugging (you can also leave this out completely, 0 is the default).