Reputation: 1047
I have a hosting on Godaddy. I have written an email app. It works properly on localhost. I can't run on hosting. When you enter the smtp settings of different servers, it still does not work. I also read the following topics.
Why mail laravel not working on the staging server?
Using Laravel, SMTP Mail not Working in Live Server
https://laracasts.com/discuss/channels/laravel/laravel-sending-mail-not-working-on-production-server
MAIL_DRIVER=smtp
MAIL_HOST=mail.domain.org
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=password
MAIL_ENCRYPTION=null
Settings running on my localhost.
Connection could not be established with host smtp.domain.org [php_network_getaddresses: getaddrinfo failed: Name or service not known #0]
Godaddy smtp settings when I give 500 error. It does not generate any error.log
Also
MAIL_DRIVER=mail
and
MAIL_DRIVER=sendmail
I tried them by looking at other links. but I couldn't find a solution.
Upvotes: 2
Views: 4578
Reputation: 5149
Unfortunately, you may not be able to use an external mail relay with shared hosting. https://www.godaddy.com/help/send-form-mail-using-an-smtp-relay-server-953
These should be the GoDaddy localhost settings:
### MAIL SERVER
MAIL_DRIVER=mail
MAIL_HOST=localhost
MAIL_PORT=25
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=null
[email protected]
MAIL_FROM_NAME="Your Company"
Upvotes: 2