Helper\Mailer\Smtp::isAvailable PHP Method

isAvailable() public method

public isAvailable ( )
    public function isAvailable()
    {
        $className = Utils::getShortName($this);
        $config = Option::get('MAIL_' . $className);
        if (!$config) {
            $_config = array("server" => "smtp.exmail.qq.com", 'from' => '发件人名 <[email protected]>', "address" => "[email protected]", "smtp_name" => "[email protected]", "smtp_pass" => "请填写密码", "smtp_ssl" => "ssl");
            Option::set('MAIL_' . $className, json_encode($_config));
            // 设定默认配置
            return false;
        }
        return true;
    }