Sending Email

I've setup my project with emails, recently I've used Mailtrap. Everything is okay. Now, I've changed my credentials with the actual one like the Mailgun. However, when I've tried sending email (Reset Password) I alway have an error of
Connection could not be established with host "mailpit:1025": stream_socket_client(): php_network_getaddresses
Connection could not be established with host "mailpit:1025": stream_socket_client(): php_network_getaddresses
when in fact I've removed this configurations. Please give some inputs.
4 Replies
lazydog
lazydog3mo ago
Ran php artisan optimize:clear Ran composer dumpautoload Restarted my IDE But no luck.
awcodes
awcodes3mo ago
Can you share your .env for the mail setting, please don’t include the user or the password. You might also need to setup mailpit in the mail.php config if it’s not smtp.
lazydog
lazydog3mo ago
This is my .env
MAIL_MAILER=mailgun
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_DOMAIN=sandboxXXXXX.mailgun.org
MAIL_USERNAME=postmaster@sandboxXXXXX.mailgun.org
MAIL_PASSWORD=9bde087dXXXXXaedaf59-2XXXXX-6f5cd8d3
MAIL_ENCRYPTION=SSL
MAILGUN_SECRET=key-848XXXXX4c7566ed7c97
MAIL_FROM_ADDRESS=support@sandboxXXXXX.mailgun.org
MAIL_FROM_NAME='Support'
MAIL_MAILER=mailgun
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_DOMAIN=sandboxXXXXX.mailgun.org
MAIL_USERNAME=postmaster@sandboxXXXXX.mailgun.org
MAIL_PASSWORD=9bde087dXXXXXaedaf59-2XXXXX-6f5cd8d3
MAIL_ENCRYPTION=SSL
MAILGUN_SECRET=key-848XXXXX4c7566ed7c97
MAIL_FROM_ADDRESS=support@sandboxXXXXX.mailgun.org
MAIL_FROM_NAME='Support'
lazydog
lazydog3mo ago
mailpit configurations were only found in these files. I just added it from mail.php Thanks @awcodes
No description