From 751604d0cd5b51c95262da1bf0fc5717701210aa Mon Sep 17 00:00:00 2001 From: Vincent Klaiber Date: Sun, 8 Oct 2023 11:42:34 +0200 Subject: [PATCH] Added mail debug --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3e764eb2..099b6531 100644 --- a/README.md +++ b/README.md @@ -199,6 +199,7 @@ add_action('phpmailer_init', function (PHPMailer $mail) { $mail->isSMTP(); $mail->SMTPAutoTLS = false; $mail->SMTPAuth = env('MAIL_USERNAME') && env('MAIL_PASSWORD'); + $mail->SMTPDebug = env('WP_DEBUG') ? SMTP::DEBUG_SERVER : SMTP::DEBUG_OFF; $mail->SMTPSecure = env('MAIL_ENCRYPTION', 'tls'); $mail->Host = env('MAIL_HOST'); $mail->Port = env('MAIL_PORT', 587);