5

Using Gmail SMTP Server to send Email in Laravel

 1 year ago
source link: https://www.laravelcode.com/post/using-gmail-smtp-server-to-send-email-in-laravel
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Using Gmail SMTP Server to send Email in Laravel

  405 views

  6 months ago

Laravel

Follow the below steps to setup email

1. Login to Gmail
2. click on user icon on top right nad select "Manage your Google Account"
3. click on security from left menu
4. turn "on" 2-step verification.
5. click on "App passwords"
6. Under your app passords select "Other" and give your application name
7. Click on "Generate"
8. Now it will display 16 character password. copy this password and keep it safe. As afterwards you will not be able to see it.
9. Edit .env file as follows

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
[email protected]
MAIL_PASSWORD=yourpassword
MAIL_ENCRYPTION=ssl
[email protected]
MAIL_FROM_NAME="${APP_NAME}"

I hope it will help you.

Author : Harsukh Makwana
Harsukh Makwana

Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK