0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 01:52:15 +02:00

Add debug output for mail and sendmail transports

This commit is contained in:
Marcus Bointon 2021-02-05 09:49:02 +01:00
parent 640e68d332
commit d8630b9e2c
No known key found for this signature in database
GPG Key ID: DE31CD6EB646AA24

View File

@ -863,8 +863,10 @@ class PHPMailer
}
//Calling mail() with null params breaks
if (!$this->UseSendmailOptions || null === $params) {
$this->edebug("Sending with mail()\nTo: {$to}\nSubject: {$subject}\nHeaders: {$header}");
$result = @mail($to, $subject, $body, $header);
} else {
$this->edebug("Sending with mail()\nTo: {$to}\nSubject: {$subject}\nHeaders: {$header}\nAdditional params: {$params}");
$result = @mail($to, $subject, $body, $header, $params);
}
@ -1661,6 +1663,7 @@ class PHPMailer
}
$sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender);
$this->edebug("Sending with sendmail\nTo: {$toAddr}\nCommand: {$sendmail}\nHeaders: {$header}");
if ($this->SingleTo) {
foreach ($this->SingleToArray as $toAddr) {