mirror of
https://github.com/retailcrm/Fetch.git
synced 2025-02-17 23:43:14 +03:00
Merge pull request #27 from ArabCoders/master
fixed bug in getting reply_to addresses
This commit is contained in:
commit
691f8e001c
@ -311,7 +311,8 @@ class Message
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!isset($this->plaintextMessage) && isset($this->htmlMessage)) {
|
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;
|
return $output;
|
||||||
} elseif (isset($this->plaintextMessage)) {
|
} elseif (isset($this->plaintextMessage)) {
|
||||||
@ -332,7 +333,8 @@ class Message
|
|||||||
*/
|
*/
|
||||||
public function getAddresses($type, $asString = 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)
|
if (!in_array($type, $addressTypes) || !isset($this->$type) || count($this->$type) < 1)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user