You still need to use the services of an SMTP server. This could be your hosting company's, your domain name provider's, your own VPS or your ISP (if local). In most cases you need the IP of the SMTP server and details of the authentication method plus credentials.
Jun 21, 2017
5
Level 13
How to send emails without any services
Hi everyone,
I'm trying to send out a simple email without using any service (mailgun, mandrill, etc).
Here's my .env file :
MAIL_DRIVER=mail
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
It's the default mailtrap stuff, but I changed the MAIL_DRIVER to mail instead of the default smtp.
Whenever I try to send an email, the page just keeps loading until it times out.
What am I doing wrong? Do I need to use the PHP built-in mail() function instead of Laravel's Mail facade? Do I need to fill out some credentials for the username/password when using the default mail driver?
I read in the docs that Laravel is using SwiftMailer, but I can't find any information on how to actually use it.
Thanks for the help!
Please or to participate in this conversation.