to($params['email']) ->subject('请查收你的验证码') ->message('你的验证码是:' . $params['code']) ->send(); return $result; } /** * 发送通知 * @param $params * @return bool */ public function emsNotice($params) { $subject = '你收到一封新的邮件!'; $content = $params['msg']; $email = new Email(); $result = $email->to($params['email']) ->subject($subject) ->message($content) ->send(); return $result; } }