Skip to content

Commit

Permalink
Merge pull request #27 from ArabCoders/master
Browse files Browse the repository at this point in the history
fixed bug in getting reply_to addresses
  • Loading branch information
tedivm committed Dec 1, 2013
2 parents 938f8cf + 0fc6487 commit 691f8e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Fetch/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ public function getMessageBody($html = false)
}
} else {
if (!isset($this->plaintextMessage) && isset($this->htmlMessage)) {
$output = strip_tags($this->htmlMessage);
$output = preg_replace('/\<br(\s*)?\/?\>/i', PHP_EOL, trim($this->htmlMessage) );
$output = strip_tags($output);

return $output;
} elseif (isset($this->plaintextMessage)) {
Expand All @@ -332,7 +333,8 @@ public function getMessageBody($html = false)
*/
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;
Expand Down

0 comments on commit 691f8e0

Please sign in to comment.