Bolt\Configuration\Check\EmailSetup::runCheck PHP Method

runCheck() public method

public runCheck ( )
    public function runCheck()
    {
        if ($this->checkMailOptions()) {
            return $this->results;
        }
        if (empty($this->options['host']) || $this->options['host'] === 'localhost') {
            $this->options['host'] = gethostname();
        }
        // Create an email
        $mailhtml = $this->getEmailHtml();
        $senderMail = $this->app['config']->get('general/mailoptions/senderMail', 'bolt@' . $this->options['host']);
        $senderName = $this->app['config']->get('general/mailoptions/senderName', $this->app['config']->get('general/sitename'));
        $this->sendMessage($senderMail, $senderName, $mailhtml);
        return $this->results;
    }