Trying to send an email using mailtrap... I successfully implemented it on localhost and it works fine, but after deploying to heroku I can't get it to work on the live server. What is the solution?
This is the smtp settings in my .env
file
MAIL_MAILER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=31239f96d871e7 MAIL_PASSWORD=***** MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS="[email protected]" MAIL_FROM_NAME="${APP_NAME}"
This is exactlywhat it looks like in my heroku
For live servers such as hosting servers, change the .env settings for smtp
................................................................. ......................................................................... ........................................
Mail_Mailer=smtp
Mail_Host=smtp.hostinger.com
Mail_Port=465
[email protected]
Mail_Password=Password
Mail_cryption=ssl
[email protected]
MAIL_FROM_NAME="${APP_NAME}"
Then go to config/mail.phpChange the transport method smtp to mail