发送电子邮件时出错
我在以下位置创建了一个简单的应用程序: graficaromana.com.br
在联系表单中 (http://graficaromana.com.br/Contato) 当我尝试发送电子邮件时出现错误。 本地邮件发送正常,没有任何错误。
我需要在主机上进行一些设置吗?在域中?
错误:
System.Net.Sockets.SocketException 连接尝试失败,因为 关联方在一段时间后没有做出适当的回应, 或建立的连接失败,因为连接的主机未能 回复209.85.225.108:25
请参阅链接中的代码以了解更多详细信息: https://gist.github.com/1149028< /a>
I created a simple application at: graficaromana.com.br
In the contact form (http://graficaromana.com.br/Contato) when I try to send an email I get an error.
Locally the mail is sent normally without any error.
Is there some setting I have to do on the host? in the domain?
Error:
System.Net.Sockets.SocketException A connection attempt failed because
the connected party did not properly respond after a period of time,
or established connection failed because connected host has failed to
respond 209.85.225.108:25
See the code for more details in link: https://gist.github.com/1149028
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来远程主机可能有一个单独的服务器,用于发送邮件,或者您必须被列入主机白名单才能发送邮件,并且可能需要用户名和密码。没有看过你的代码,但当涉及防火墙并且尝试发送的机器无法通过防火墙访问时,我看到它们出现某种错误,因为防火墙根本不响应,你会得到类似“服务器做了”的答案没有及时响应”或“服务器在一定时间后没有响应”我假设您在此处发帖之前已询问托管提供商有关发送邮件的信息,以及应如何发送邮件的偏好进行?正确的?
如果是这样,请提供有关他们所说内容的信息,
这是发送电子邮件的代码示例:
looks like the remote host has maybe a separate server they use for sending mail out or that you have to be whitelisted with the host in order to send mail and a username and password may be required. have not looked at your code but i see them kind of errors when there is a firewall involved and the machine trying to send does not have access through the firewall, as the firewall does not respond at all you get an answer like ' The server did not respond in a timely manner' or 'the server did not respond after a certain amount of time' i am assuming that before you posted on here that you have asked the hosting provider about sending mail, and what there preference is on how this should be carried out? right?
if so please provide info on what they have said
here is a sample of code to send email: