Sending emails using SendGrid in Laravel

Follow these few simple steps,
Step 1 – Register SendGrid Account
Go to https://sendgrid.com .Click Try for Free button
Fill all the necessary details
Wait for a email from SendGrid conforming that your account is provisioned.
Cool,you are ready to go.
Step 2 – Change mail configurations in .env and mail.php files
Open .env located at root of the application, edit the file as belowNow open mail.php located in /config/mail.php, (for further reference on folder/application structure look at previous post on Laravel application structure)
edit the file as below,
if your website has ssl certificate, change the line
'encryption' => 'tls' to'encryption' => 'ssl' and 'port' => 465,
Step 3 – Send emails the way you want
We ‘ll create some textarea, and the text entered will be sent as a mail when an valid email is entered,check the form below,
and we create another form just with email field,
When the send button is clicked we route it to the following function,
and the view for the emails which we are going to be send be like,
That’s it, look the below screen shots for reference,