为什么 Laravel 邮件不能在实时服务器上运行?
Why does Laravel mail not work on a live server?
我在 Godaddy 上有一个主机。我写了一个电子邮件应用程序。它在本地主机上正常工作。我无法 运行 托管。当你进入不同服务器的smtp设置时,还是不行。我还阅读了以下主题。
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
Connection could not be established with host mailtrap.io [php_network_getaddresses: getaddrinfo failed: No such host is known. #0]
MAIL_DRIVER=smtp
MAIL_HOST=mail.domain.org
MAIL_PORT=587
MAIL_USERNAME=user@domain.org
MAIL_PASSWORD=password
MAIL_ENCRYPTION=null
在我的本地主机上设置 运行ning。
Connection could not be established with host smtp.domain.org [php_network_getaddresses: getaddrinfo failed: Name or service not known #0]
Godaddy smtp 设置时出现 500 错误。它不会生成任何 error.log
还有
MAIL_DRIVER=mail
和
MAIL_DRIVER=sendmail
我通过查看其他链接尝试了它们。但我找不到解决方案。
很遗憾,您可能无法通过共享主机使用外部邮件中继。
https://www.godaddy.com/help/send-form-mail-using-an-smtp-relay-server-953
这些应该是 GoDaddy 本地主机设置:
### MAIL SERVER
MAIL_DRIVER=mail
MAIL_HOST=localhost
MAIL_PORT=25
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=user@domain.com
MAIL_FROM_NAME="Your Company"
我在 Godaddy 上有一个主机。我写了一个电子邮件应用程序。它在本地主机上正常工作。我无法 运行 托管。当你进入不同服务器的smtp设置时,还是不行。我还阅读了以下主题。
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
Connection could not be established with host mailtrap.io [php_network_getaddresses: getaddrinfo failed: No such host is known. #0]
MAIL_DRIVER=smtp
MAIL_HOST=mail.domain.org
MAIL_PORT=587
MAIL_USERNAME=user@domain.org
MAIL_PASSWORD=password
MAIL_ENCRYPTION=null
在我的本地主机上设置 运行ning。
Connection could not be established with host smtp.domain.org [php_network_getaddresses: getaddrinfo failed: Name or service not known #0]
Godaddy smtp 设置时出现 500 错误。它不会生成任何 error.log
还有
MAIL_DRIVER=mail
和
MAIL_DRIVER=sendmail
我通过查看其他链接尝试了它们。但我找不到解决方案。
很遗憾,您可能无法通过共享主机使用外部邮件中继。 https://www.godaddy.com/help/send-form-mail-using-an-smtp-relay-server-953
这些应该是 GoDaddy 本地主机设置:
### MAIL SERVER
MAIL_DRIVER=mail
MAIL_HOST=localhost
MAIL_PORT=25
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=user@domain.com
MAIL_FROM_NAME="Your Company"