From 43bc07b3ee51f7d3f5ecd783b8195da26cc43f03 Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Sun, 27 Jan 2008 18:17:41 +0100 Subject: [PATCH] fix saving of time_sent_latest for bounce messages --- include/classes/email.php-class | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) mode change 100755 => 100644 include/classes/email.php-class diff --git a/include/classes/email.php-class b/include/classes/email.php-class old mode 100755 new mode 100644 index 0c485fe..2de9ca4 --- a/include/classes/email.php-class +++ b/include/classes/email.php-class @@ -172,11 +172,13 @@ class email { public function getAddresses($addrtype = null) { // returns all addresses this mail gets sent to - $addrtype = explode(',', strtolower($addrtype)); - if (!is_array($addrtype)) { $addrtype = array('to','cc','bcc'); } + if (!is_array($addrtype)) { + if (strlen($addrtype)) { $addrtype = explode(',', strtolower($addrtype)); } + else { $addrtype = array('to','cc','bcc'); } + } $mailaddresses = array(); - if (in_array($addrtype, 'to')) { + if (in_array('to', $addrtype)) { foreach ($this->recipients as $address) { if (strlen(@$address['mail'])) { $mailaddresses[] = array('mail'=>$address['mail'], @@ -185,7 +187,7 @@ class email { } } } - if (in_array($addrtype, 'cc')) { + if (in_array('cc', $addrtype)) { foreach ($this->cc as $address) { if (strlen(@$address['mail'])) { $mailaddresses[] = array('mail'=>$address['mail'], @@ -194,7 +196,7 @@ class email { } } } - if (in_array($addrtype, 'bcc')) { + if (in_array('bcc', $addrtype)) { foreach ($this->bcc as $address) { if (strlen(@$address['mail'])) { $mailaddresses[] = array('mail'=>$address['mail'], @@ -203,6 +205,8 @@ class email { } } } + + return $mailaddresses; } public function send() { @@ -334,7 +338,5 @@ class email { } return $mText; } - - } ?> -- 2.35.3