private function send($message)
    {
        $widget = new Widget;
        $templateParams = Json::decode($message->packed_json_template_params);
        return \Yii::$app->mailer
            ->compose($message->template->body_view_file, $templateParams)
            ->setFrom(Module::module()->senderEmail)
            ->setTo(trim($message->email))
            ->setSubject(
                $widget->render($message->template->subject_view_file, $templateParams)
            )
            ->send();
    }
private function send($message)
    {
        $widget = new Widget;
        $templateParams = Json::decode($message->packed_json_template_params);
        return \Yii::$app->mailer
            ->compose($message->template->body_view_file, $templateParams)
            ->setFrom(Module::module()->senderEmail)
            ->setTo(trim($message->email))
            ->setSubject(
                $widget->render($message->template->subject_view_file, $templateParams)
            )
            ->send();
    }
private function send ( $ message ) { $ widget = new Widget ; $ templateParams = Json :: decode ( $ message -> packed_json_template_params ) ; return \ Yii :: $ app -> mailer -> compose ( $ message -> template -> body_view_file , $ templateParams ) -> setFrom ( Module :: module ( ) -> senderEmail ) -> setTo ( trim ( $ message -> email ) ) -> setSubject ( $ widget -> render ( $ message -> template -> subject_view_file , $ templateParams ) ) -> send ( ) ; }
Send the message via swift mailer
@param Message $message
@return bool
Send the message via swift mailer