Can i build a message for a Mailable using SimpleMessage instead creating a view? [laravel53]

Posted 2 years ago by selmonal

Can i build a message for a Mailable using SimpleMessage? Like below, is it possible?

class Welcome extends Mailable
{
    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return (new MailMessage)
                    ->subject('Welcome!') ->line('The introduction to the notification.')
                    ->line('Thank you for using our application!')
                    ->view();
    }
}

Please sign in or create an account to participate in this conversation.