---
description: >-
  https://www.itsolutionstuff.com/post/how-to-send-mail-using-sendinblue-in-laravelexample.html
---

# How to Send Mail using Sendinblue in Laravel?

## How to Send Mail using Sendinblue in Laravel?

By Hardik Savani January 27, 2021 Category : Laravel![](https://a.vdo.ai/core/assets/img/cross.svg)PlayUnmuteLoaded: 1.17%Fullscreen[![VDO.AI](https://a.vdo.ai/core/assets/img/logo.svg)](https://vdo.ai/?utm_medium=video\&utm_term=itsolutionstuff.com\&utm_source=vdoai_logo)In this article we will cover on how to implement how to send mail using sendinblue in laravel. we will help you to give example of laravel send mail sendinblue example. This article goes in detailed on laravel sendinblue smtp example. it's simple example of laravel sendinblue send email. So, let's follow few step to create example of laravel sendinblue mail driver.

we can easily send mail using sendinblue driver in laravel 6, laravel 7, laravel 8 and laravel 9 app.

In this example, i will give you step by step instruction to send email in laravel using sendinblue. you can create blade file design and also with dynamic information for mail layout. so let's see step by step guide and send email to your requirement.

**Step 1: Add Configuration**

First you need to create account on sendinblue if you don't have. So click bellow link to create account:

[Sendinblue Site: https://www.sendinblue.com](https://www.sendinblue.com/)

After creating account and domain active you have to go bellow url as like bellow screen shot:

[Setup Page: https://account.sendinblue.com/advanced/api](https://account.sendinblue.com/advanced/api)

you have to pickup, Login and Secret with other configuration.

![](https://www.itsolutionstuff.com/upload/laravel-sendinblue.png)

add details from there bellow:

.env

```
MAIL_DRIVER=smtpMAIL_HOST=smtp-relay.sendinblue.comMAIL_PORT=587MAIL_USERNAME=one@...caMAIL_PASSWORD=kMdNQDhC7BxHzS1sMAIL_ENCRYPTION=tlsMAIL_FROM_ADDRESS=one@...caMAIL_FROM_NAME="${APP_NAME}"
```

**Step 2: Create Mail**

In this step we will create mail class MyTestMail for email sending. Here we will write code for which view will call and object of user. So let's run bellow command.

```
php artisan make:mail MyTestMail
```

app/Mail/MyTestMail.php

```
<?php  namespace App\Mail;  use Illuminate\Bus\Queueable;use Illuminate\Contracts\Queue\ShouldQueue;use Illuminate\Mail\Mailable;use Illuminate\Queue\SerializesModels;  class MyTestMail extends Mailable{    use Queueable, SerializesModels;      public $details;      /**     * Create a new message instance.     *     * @return void     */    public function __construct($details)    {        $this->details = $details;    }      /**     * Build the message.     *     * @return $this     */    public function build()    {        return $this->subject('Mail from ItSolutionStuff.com')                    ->view('emails.myTestMail');    }}
```

Read Also: [How to Send Mail using Sendgrid in Laravel?](https://www.itsolutionstuff.com/post/how-to-send-mail-using-sendgrid-in-laravel-5example.html)

**Step 3: Create Blade View**

In this step, we will create blade view file and write email that we want to send. now we just write some dummy text. create bellow files on "emails" folder.

resources/views/emails/myTestMail.blade.php

```
<!DOCTYPE html><html><head>    <title>ItsolutionStuff.com</title></head><body>    <h1>{{ $details['title'] }}</h1>    <p>{{ $details['body'] }}</p>       <p>Thank you</p></body></html>
```

**Step 4: Add Route**

Now at last we will create "MyTestMail" for sending our test email. so let's create bellow web route for testing send email.

routes/web.php

```
Route::get('send-mail', function () {       $details = [        'title' => 'Mail from ItSolutionStuff.com',        'body' => 'This is for testing email using smtp'    ];       \Mail::to('your_receiver_email@gmail.com')->send(new \App\Mail\MyTestMail($details));       dd("Email is Sent.");});
```

[![](https://go.ezodn.com/charity/http/charity-ads.s3.amazonaws.com/charity_ads/1094/300x250.png)](https://go.ezodn.com/ads/charity/proxy?p_id=97f5518a-78c0-4b0d-724f-2b26fc108fdf\&d_id=77568\&imp_id=2824612608255035\&c_id=1094\&l_id=10016\&url=https%3A%2F%2Ffundraise.pencilsofpromise.org%2Fgive%2F405130%2F%23!%2Fdonation%2Fcheckout%3Fc_src%3Dadsezoic\&ffid=1\&co=VN)[![](https://go.ezodn.com/charity/http/charity-ads.s3.amazonaws.com/charity_ads/1094/300x250.png)](https://go.ezodn.com/ads/charity/proxy?p_id=97f5518a-78c0-4b0d-724f-2b26fc108fdf\&d_id=77568\&imp_id=2824612608255035\&c_id=1094\&l_id=10016\&url=https%3A%2F%2Ffundraise.pencilsofpromise.org%2Fgive%2F405130%2F%23!%2Fdonation%2Fcheckout%3Fc_src%3Dadsezoic\&ffid=1\&co=VN)[![](https://go.ezodn.com/charity/http/charity-ads.s3.amazonaws.com/charity_ads/1094/300x250.png)](https://go.ezodn.com/ads/charity/proxy?p_id=97f5518a-78c0-4b0d-724f-2b26fc108fdf\&d_id=77568\&imp_id=2824612608255035\&c_id=1094\&l_id=10016\&url=https%3A%2F%2Ffundraise.pencilsofpromise.org%2Fgive%2F405130%2F%23!%2Fdonation%2Fcheckout%3Fc_src%3Dadsezoic\&ffid=1\&co=VN)

Now you can run and check example.

It will send you email, let' see.

Run Project:

```
php artisan serve
```

Open Link:

Read Also: [How to Send Mail using Mailjet in Laravel?](https://www.itsolutionstuff.com/post/how-to-send-mail-using-mailjet-in-laravelexample.html)

```
localhost:8000/send-mail
```

Output:

![](https://www.itsolutionstuff.com/upload/laravel-7-mail-2.png)

I hope it can help you...
