App\Modules\Demos\Controllers\Demos::mailer PHP Method

mailer() public method

public mailer ( )
    public function mailer()
    {
        $data = array('title' => __d('demos', 'Welcome to {0}!', SITETITLE), 'content' => __d('demos', 'This is a test!!!'));
        Mailer::pretend(true);
        Mailer::send('Emails/Welcome', $data, function ($message) {
            $message->from('admin@novaframework', 'Administrator')->to('john@novaframework', 'John Smith')->subject('Welcome!');
        });
        // Prepare and return the View instance.
        $content = __d('demos', 'Message sent while pretending. Please, look on <code>{0}</code>', 'app/Storage/Logs/messages.log');
        return View::make('Default')->shares('title', __d('demos', 'Mailing API'))->with('content', $content);
    }