How to set up Laravel Sending Driver with Dynamic Sender

Asked

Viewed 129 times

0

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=Senha123
MAIL_ENCRYPTION=tls

How to leave [email protected] and MAIL_PASSWORD=Senha123 according to the user data that is logged in.

  • Using which version of the Laravel ?

  • Hello, the version is 5.5.36

1 answer

0

Hello, I am able to send the email right, the only problem is that in addition to these settings that you mentioned, which are already done, it is still necessary to do the configuration in the file . env, e la deve ser colocar estes dados.

MAIL_DRIVER=smtp 
MAIL_HOST=smtp.gmail.com 
MAIL_PORT=587 
[email protected] 
MAIL_PASSWORD=Senha123 
MAIL_ENCRYPTION=tls

The sender email will always be the placed [email protected] , is what I need to leave according to the logged in user, and do not have to paste a fixed email there.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.