Closed lmarshman closed 1 year ago
The error message makes reference to mailpit
which is the default email testing tool Laravel comes pre-configured with.
Looking at your .env file, I can see it still has all the default values, including the MAIL_HOST
set to mailpit
:
MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
You'll need to update these values to reflect the MailTrap settings. As a hint, if you go into your inbox settings in MailTrap and choose Laravel as the integration, it'll give you all the values you need to put in your .env file:
If that doesn't sort things out, let me know!
Ah! That was the missing piece! Thank you!
I'm working on the independent challenge and have run into an error message that I don't understand, and can't find information on when I try to research it. I've followed the information in the Laravel Mail documentation and am confused where I've gone wrong. The exact error message I am receiving is:
Connection could not be established with host "mailpit:1025": stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
The error occurs in my BookController in the store function when I try to send the email.
I'm not sure if the issue is in my mailable, in my mail configuration file, or the actual Store function noted above. Has anyone else ever run into this error?