public property PHPMailer::$Debugoutput

How to handle debug output. Options:

  • `echo` Output plain-text as-is, appropriate for CLI
  • `html` Output escaped, line breaks converted to `<br>`, appropriate for browser output
  • `error_log` Output to error log as configured in php.ini

By default PHPMailer will use `echo` if run from a `cli` or `cli-server` SAPI, `html` otherwise. Alternatively, you can provide a callable expecting two params: a message string and the debug level:

```php $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; ```

Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` level output is used:

```php $mail->Debugoutput = new myPsr3Logger; ```

Type: string|callable|\Psr\Log\LoggerInterface

See also

SMTP::$Debugoutput

File

inc/PHPMailer/src/PHPMailer.php, line 396

Class

PHPMailer
PHPMailer - PHP email creation and transport class.

Namespace

PHPMailer\PHPMailer

Code

public $Debugoutput = 'echo';