diff options
-rw-r--r-- | app/Helper/MailHelper.php | 5 | ||||
-rw-r--r-- | tests/units/Helper/MailHelperTest.php | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/Helper/MailHelper.php b/app/Helper/MailHelper.php index b42d83ab..cb16d6f8 100644 --- a/app/Helper/MailHelper.php +++ b/app/Helper/MailHelper.php @@ -40,8 +40,9 @@ class MailHelper extends Base */ public function filterSubject($subject) { - $subject = str_replace('RE: ', '', $subject); - $subject = str_replace('FW: ', '', $subject); + $subject = str_ireplace('RE: ', '', $subject); + $subject = str_ireplace('FW: ', '', $subject); + $subject = str_ireplace('Fwd: ', '', $subject); return $subject; } diff --git a/tests/units/Helper/MailHelperTest.php b/tests/units/Helper/MailHelperTest.php index e871a57d..c6f13042 100644 --- a/tests/units/Helper/MailHelperTest.php +++ b/tests/units/Helper/MailHelperTest.php @@ -20,6 +20,7 @@ class MailHelperTest extends Base $this->assertEquals('Test', $helper->filterSubject('Test')); $this->assertEquals('Test', $helper->filterSubject('RE: Test')); $this->assertEquals('Test', $helper->filterSubject('FW: Test')); + $this->assertEquals('Test', $helper->filterSubject('Fwd: Test')); } public function testGetSenderAddress() |