Answer the question
In order to leave comments, you need to log in
How to work with mail in laravel using mail() function?
Explain, please. I've used the standard mail() function to send email all my life. Now I am working on Laravel and I understand that this is already the stone age, there are other more convenient options for sending emails. True, I don't get the point. There are a lot of ways to send mail, but, as I understand it, they all use smpt servers. I always used mail() and added the email address of the domain on which the site works to the from. It was easy and simple, and letters always went to the inbox. But now, as I understand it, I need to look for smpt servers somewhere, or how else? What should I do if I need the site to send letters, while all I have is mail on the same domain as the site works and nothing else. What are my actions? Thank you in advance!
Answer the question
In order to leave comments, you need to log in
I strongly recommend using SMTP or some mailing service, but for the stubborn .env
:
MAIL_DRIVER=mail
MAIL_HOST=null
MAIL_PORT=null
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
[email protected]
MAIL_FROM_NAME=Example
Have you tried to read the documentation at least a little at all? Everything is there, including an example of sending messages. In the configuration, you can specify the use of local sending using the same mail () function. In general, read the docks, it will take no more than 5 minutes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question