How to Send Mail using Sendgrid in Laravel?
https://www.itsolutionstuff.com/post/how-to-send-mail-using-sendgrid-in-laravel-5example.html
Last updated
https://www.itsolutionstuff.com/post/how-to-send-mail-using-sendgrid-in-laravel-5example.html
Last updated
By Hardik Savani May 10, 2016 Category : Laravel SendgridPlayUnmuteLoaded: 1.17%FullscreenSendgrid is very popular API to send email from our laravel application. It is very fast to send mail and also you can track sended mail. Tracking email is very important feature of Sendgrid api and you can also see how much user open your mail, click on your mail too. In this post i would like to show you how to setting of Sendgrid in our laravel 5 application. In this example you can learn to send simple mail using Sendgrid site. If you are use Sendgrid for sending email then you can save loading time and you can get mail fast.
First we will add configration on mail. i added my gmail account configration. so first open .env file and bellow code:
.env
Ok, now we need to add secret and domain of sendgrid api configration. So first create new account in sendgrid.com if you don't have before. After registeration active your sendgrid account and set username and password
Now we are ready to send mail for test so first create test route for email sending.
app/Http/routes.php
Ok, now add mail function in HomeController.php file so add this way :
app/Http/Controllers/HomeController.php
At last create email template file for send mail so let's create mailEvent.blade.php file in emials folder.
resources/views/emails/mailEvent.blade.php
Read Also: How to send mail using mailable in laravel 5.3?