Email Configuration in Laravel

Email in laravel can be eaeily configured in laravel using smtp.

Email in laravel can be eaeily configured in laravel using smtp.

Email can be configured in larvel in .env by 2 ways:

1. Using gmail account


    MAIL_DRIVER=smtp
    MAIL_HOST=smtp.googlemail.com
    MAIL_PORT=465
    MAIL_USERNAME=johndoe@gmail.com
    MAIL_PASSWORD="john@2023"
    MAIL_ENCRYPTION=ssl

1. Using domain email account


    MAIL_DRIVER=smtp
    MAIL_HOST=domainname.com
    MAIL_PORT=587
    MAIL_USERNAME=noreply@domainname.com
    MAIL_PASSWORD="john@2023"
    MAIL_ENCRYPTION=tls

0 Comment's

Add Comment

Register to Reply

About Author

I am Bhawesh Bhaskar, a Full Stack Sr. Software Developer. I am a good learner and always eager to learn new technologies. I can develop both client and server software. In addition to mastering HTML and CSS, I also know how to: Program a browser (like using JavaScript, jQuery) Program a server (like using Laravel, Code Ignitor or Core PHP).