diff --git a/changelog.md b/changelog.md index 2162d369..f3fbbbf7 100644 --- a/changelog.md +++ b/changelog.md @@ -53,6 +53,7 @@ This is a major update that breaks backwards compatibility. * Throw an exception when trying to send a message with an empty body caused by an internal error. * Replaced all use of MD5 and SHA1 hash functions with SHA256. * Now checks for invalid host strings when sending via SMTP. +* Include timestamps in HTML-format debug output ## Version 5.2.23 (March 15th 2017) * Improve trapping of TLS errors during connection so that they don't cause warnings, and are reported better in debug output diff --git a/src/SMTP.php b/src/SMTP.php index eb9b1165..21a37099 100644 --- a/src/SMTP.php +++ b/src/SMTP.php @@ -231,7 +231,7 @@ class SMTP break; case 'html': //Cleans up output a bit for a better looking, HTML-safe output - echo htmlentities( + echo gmdate('Y-m-d H:i:s') . ' ' . htmlentities( preg_replace('/[\r\n]+/', '', $str), ENT_QUOTES, 'UTF-8'