简体   繁体   English

SMTP邮件-无法与主机建立连接的可能原因是什么?

[英]SMTP mail - What could be possible reasons of Connection could not be established with host?

I am stuck through the day but couldn't find any solution for the error - 我整日忙于工作,但找不到该错误的任何解决方案-

Connection could not be established with host mail.mydomain.com [php_network_getaddresses: getaddrinfo failed: Name or service not known #0] 无法与主机mail.mydomain.com建立连接[php_network_getaddresses:getaddrinfo失败:名称或服务未知#0]

Following is my .env file - 以下是我的.env文件-

MAIL_DRIVER=smtp
MAIL_HOST=mail.mydomain.com
MAIL_PORT=587 // tried 25 as well
MAIL_USERNAME=info@mydomain.com
MAIL_PASSWORD=Password123
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=info@mydomain.com
MAIL_FROM_NAME='My App'

I have purchased domain from godaddy and hosted my app on host gator. 我已经从godaddy购买了域名,并将我的应用托管在托管鳄鱼上。 I am not sure is there anything related to the MX record set I need to check? 我不确定是否需要检查与MX记录集相关的任何内容?

What could be all possible reasons for this error? 导致此错误的所有可能原因是什么? Please help me out. 请帮帮我。

getaddrinfo failed usually means that the host is not reachable from the machine. getaddrinfo failed通常意味着无法从计算机访问主机。 Maybe you didn't configure your DNS for mail.yourdomain.com ? 也许您没有为mail.yourdomain.com配置DNS?

You can try an email client (on the same machine) with the same credentials to see if it's able to send email, I guess it wil fail as well. 您可以尝试使用具有相同凭据的电子邮件客户端(在同一台计算机上)以查看其是否能够发送电子邮件,我想它也会失败。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Lravel邮件未发送-无法与主机smtp.gmail.com建立连接[连接超时#110] - Lravel Mail not sending — Connection could not be established with host smtp.gmail.com [Connection timed out #110] Laravel无法发送邮件无法与主机smtp.mailgun.org建立连接 - Laravel can't send mail Connection could not be established with host smtp.mailgun.org 无法与主机smtp.gmail.com [#0]建立连接 - Connection could not be established with host smtp.gmail.com [ #0] 无法与SwiftMailer中的主机smtp.gmail.com [#0]建立连接 - Connection could not be established with host smtp.gmail.com [#0] in SwiftMailer 无法与主机smtp.gmail.com建立连接 - Connection could not be established with host smtp.gmail.com Laravel 在Windows 7中无法使用主机smtp.gmail.com建立Laravel 5连接 - Laravel 5 Connection could not be established with host smtp.gmail.com in windows 7 无法与主机 smtp.gmail.com 建立连接 - Connection could not be established with host smtp.gmail.com 无法与主机 smtp.mailtrap.io 建立连接 - Connection could not be established with host smtp.mailtrap.io 无法与主机 smtp.mailtrap.io:stream_socket_client() 建立连接:使用 SENDGRID 发送邮件时 - Connection could not be established with host smtp.mailtrap.io :stream_socket_client(): when using SENDGRID to send mail 无法与主机建立SwiftMailer连接 - SwiftMailer Connection could not be established with host
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM