From 916ebb13e92fd46b10ea628c1e943fb7255db746 Mon Sep 17 00:00:00 2001 From: "Abdul.Mohsen B. A. A" Date: Fri, 20 Sep 2013 01:33:38 +0300 Subject: [PATCH 1/2] fixed bug in getting reply_to addresses --- src/Fetch/Message.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Fetch/Message.php b/src/Fetch/Message.php index 009829f..14003a7 100644 --- a/src/Fetch/Message.php +++ b/src/Fetch/Message.php @@ -332,7 +332,8 @@ class Message */ public function getAddresses($type, $asString = false) { - $addressTypes = array('to', 'cc', 'bcc', 'from', 'reply-to'); + $type = ( $type == 'reply-to' ) ? 'replyTo' : $type; + $addressTypes = array('to', 'cc', 'bcc', 'from', 'replyTo'); if (!in_array($type, $addressTypes) || !isset($this->$type) || count($this->$type) < 1) return false; From 0fc648712df26f0516c374fe6f340a5348435bfa Mon Sep 17 00:00:00 2001 From: "Abdul.Mohsen B. A. A" Date: Fri, 20 Sep 2013 01:53:29 +0300 Subject: [PATCH 2/2] preserve newlines when stripping HTML tags --- src/Fetch/Message.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Fetch/Message.php b/src/Fetch/Message.php index 14003a7..af01340 100644 --- a/src/Fetch/Message.php +++ b/src/Fetch/Message.php @@ -311,7 +311,8 @@ class Message } } else { if (!isset($this->plaintextMessage) && isset($this->htmlMessage)) { - $output = strip_tags($this->htmlMessage); + $output = preg_replace('/\/i', PHP_EOL, trim($this->htmlMessage) ); + $output = strip_tags($output); return $output; } elseif (isset($this->plaintextMessage)) {