How to use cPanel email accounts to send confirmation emails in laravel?

Paul Lucero picture Paul Lucero · Jul 27, 2016 · Viewed 8.7k times · Source

I have uploaded my laravel project onto the production server. Locally, I was using my personal gmail account to send confirmation emails to new users. Since I've uploaded it already, I created an email account in cpanel "[email protected]". How do I use this in my Laravel project?

  1. Can I use this to send email confirmations to new users? Or do I need to create another service provider like Mandrill or Mailchimp?
  2. If I can use this, what is the settings? Sorry I'm very new.

Answer

edCoder picture edCoder · Jul 27, 2016

In .env file add following details

MAIL_DRIVER=smtp
MAIL_HOST=your_host
MAIL_PORT=your_port
MAIL_USERNAME=your_mail_username
MAIL_PASSWORD=your_mail_password
MAIL_ENCRYPTION=your_encryption