Learn how to extend the Mail Driver in Laravel 5.3
Younes Rafie wrote a nice tutorial about Mail Logging in Laravel 5.3.
One of the many goodies Laravel offers is mailing. You can easily configure and send emails through multiple popular services, and it even includes a logging helper for development.
Mail::send('emails.welcome', ['user' => $user], function ($m) use ($user) { $m->to($user->email, $user->name)->subject('Welcome to the website'); });
This will send an email to a new registered user on the website using the emails.welcome view. It got even simpler with Laravel 5.3 using mailables (but the old syntax is still valid).
Link:
This post is submitted by our members. Submit a new post.
Tags: Tutorials Laravel 5 Laravel 5.3