From 4e39028fb13e0227f29d52ace083045b17738a1a Mon Sep 17 00:00:00 2001 From: fridde Date: Tue, 13 Mar 2018 19:14:35 +0100 Subject: [PATCH] Enable uppercase property matching Solved a bug where the subject property created by PHPMailer was not translated. The if clause checked only for "=?utf-8?Q?" but PHPMailer starts its subjects with "=?UTF-8?Q?". With the extra conversion to lowercase we should be on the safe side. --- src/MailHog.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MailHog.php b/src/MailHog.php index acbfc36..134a835 100644 --- a/src/MailHog.php +++ b/src/MailHog.php @@ -444,7 +444,7 @@ protected function getDecodedEmailProperty($email, $property) { ) { $property = quoted_printable_decode($property); } - if (strpos($property, '=?utf-8?Q?') !== false && extension_loaded('mbstring')) { + if (strpos(strtolower($property), '=?utf-8?q?') !== false && extension_loaded('mbstring')) { $property = mb_decode_mimeheader($property); } }