From cd25a4216e994c310bdbbd1199676be4b806f87e Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 9 Jan 2017 09:29:09 +0800 Subject: [PATCH] * fix for save mail queue. --- module/mail/model.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/mail/model.php b/module/mail/model.php index d6fa4df0e7..48d07f9f9d 100644 --- a/module/mail/model.php +++ b/module/mail/model.php @@ -499,6 +499,10 @@ class mailModel extends model foreach($toList as $key => $to) if(trim($to) == $account or !trim($to)) unset($toList[$key]); foreach($ccList as $key => $cc) if(trim($cc) == $account or !trim($cc)) unset($ccList[$key]); } + + if(!$toList and !$ccList) return; + if(!$toList and $ccList) $toList = array(array_shift($ccList)); + $toList = join(',', $toList); $ccList = join(',', $ccList); if(empty($toList) or empty($subject)) return true;