Added on Fri, 23 Aug 2019
This is something I always end up googling from time to time. Here are few things I needed to understand. As I get started with laravel app, most of my apps have something to do with email in some way. The default values for this in a new laravel app will be:
If we were to send email from a laravel app in cPanel, first thing is MAIL_DRIVER. smtp is the default value and it is what we need to write.
Next variable is MAIL_HOST. For cPanel, you can set it to your domain name or if that doesn’t work, add smtp in the front like so: smtp.example.com
Set MAIL_PORT to 587 and create one email from cPanel and add a secure password. It should
Environment variables in .env file should look like:
And now we should be able to send email from an laravel app
Thank you for reading. Please clap if it helped you in some way.