Laravel Redirect To Another URL / Web Page - HTTP Laravel Redirects

Send Emails Using Laravel 6 Mailable Class?

Today, We want to share with you How To Send Emails Using Laravel 6 Mailable Class.In this post we will show you Laravel 6 Sending Emails Tutorial Example, hear for Send Email with Laravel 6 using Markdown Mailable Class we will give you demo and example for implement.In this post, we will learn about Sending Email, send email, send email in laravel 6, mail() Function with an example.

List of all Google Adsense, VueJS, AngularJS, PHP, Laravel Examples.

How To Send Emails Using Laravel 6 Mailable Class

There are the Following The simple About how to send email in laravel 6 example Full Information With Example and source code.

As I will cover this Post with live Working example to develop How to Send Mail using smtp in Laravel 6?, so the How To Laravel 6 Send Email Tutorial And Example is used for this example is following below.

Laravel 6 Supports an API with driver support for SMTP, PHP Laravel 6 SendMail, using Mailgun, using Sendgrid, Mandrill, using Amazon SES, SpartPost, or More.

Step 1: Change Simple Send Mail Configuration


add send Email configuration with mail driver, mail host Name, mail port, mail username, mail security password

[email protected]

Step 2: Create Mail

php artisan make:mail SendMail


namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class SendMail extends Mailable
    use Queueable, SerializesModels;
    public $userInfo;
     * Create a new message instance.
     * @return void
    public function __construct($userInfo)
        $this->userInfo = $userInfo;
     * Build the message.
     * @return $this
    public function build()
        return $this->subject('Good Latest Testing for Mail from')

Step 3: Create Blade View


<!DOCTYPE html>
    <h1>{{ $userInfo['title'] }}</h1>
    <p>{{ $userInfo['body'] }}</p>
     <p>Thank you, {{ $userInfo->user_name }}</p>

Step 4: Define a Laravel 6 Route


Route::get('sendmail', function () {
    $userInfo = [
        'title' => 'PHP Laravel 6 Send Email Example - for Testing Purpose',
        'body' => 'This is a email demo from TamilRokers jio 2020 to 2025',
        'user_name' => 'Virat Kohali'
    \Mail::to('[email protected]')->send(new \App\Mail\SendMail($userInfo));
    Session::flash('success', trans('messages.MailSendSuccess'));
    return redirect('mail');

Web Programming Tutorials Example with Demo

Read :


You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about laravel 6 send mail example smtp.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Related FAQ

Here are some more FAQ related to this Article:

  1.   vue router change route programmatically
  2.   Wordpress set and get User last login Date and time
  3.   Laravel PHP Artisan Commands list with Example
  4.   Send HTML Form Data as JSON via Ajax
  5.   store all record using laravel Cache Example
  6.   Laravel Free charts and graphs for HTML5, JQuery and Javascript
  7.   PHP CodeIgniter 3 Generate Random record from mysql
  8.   Dependent dropdown example in PHP MySQL
  9.   Solution Fatal error: Call to undefined function base_url() in Codeigniter
  10.   pagination code in php with next and previous demo