Why echo texas of phpmailer class?

when I send an email, repeat many unnecessary texts, I do not want this text to be printed. how can i turn off this text.

Example:

SMTP -> FROM SERVER:220 mx.google.com ESMTP p1sm1037082ybn.17
SMTP -> FROM SERVER: 250-mx.google.com at your service, [xxx.xxx.xxx.xxx] 250-SIZE 35651584 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH 250 ENHANCEDSTATUSCODES
SMTP -> FROM SERVER:250 2.1.0 OK p1sm1037082ybn.17
SMTP -> FROM SERVER:250 2.1.5 OK p1sm1037082ybn.17
SMTP -> FROM SERVER:354 Go ahead p1sm1037082ybn.17
SMTP -> FROM SERVER:250 2.0.0 OK 1290167720 p1sm1037082ybn.17

I am using the class.phpmailer.php file and using the $ obj.Send () method to send email. ??

thank

+5
source share
3 answers

PHPMailer has a debug flag that you can disable.

Depending on which version you are using, it may be called Debugor SMTPDebug. You will know it when you see it. If necessary, look in the class file to find out the name.

Set to false and everything will be fine.

+9
source

- . , print/echo/function.

ob_start() ob_get_clean() script, .

+5

As mentioned above, the SMTPDebug parameter , just do:

$mail->SMTPDebug = 0;
+3
source

All Articles