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="browynlouis2@gmail.com" 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
Mail_Username=example@domain.com
Mail_Password=Password
Mail_cryption=ssl
Mail_From_Address=example@domain.com
MAIL_FROM_NAME="${APP_NAME}"
Then go to config/mail.phpChange the transport method smtp to mail