mirror of https://gitee.com/karson/fastadmin.git
解决使用自带Email类发送邮件时,收件人账号名是数组索引的问题
parent
af241c7c21
commit
5ab531e0ec
|
|
@ -176,7 +176,12 @@ class Email
|
||||||
*/
|
*/
|
||||||
protected function buildAddress($emails)
|
protected function buildAddress($emails)
|
||||||
{
|
{
|
||||||
$emails = is_array($emails) ? $emails : array_flip(explode(',', str_replace(";", ",", $emails)));
|
if (!is_array($emails)) {
|
||||||
|
$emails = array_flip(explode(',', str_replace(";", ",", $emails)));
|
||||||
|
foreach ($emails as $key => $value) {
|
||||||
|
$emails[$key] = strstr($key, '@', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
return $emails;
|
return $emails;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue