[英]Sending mail using SMTP settings?
I have a code for sending mail using SMTP settings in asp.net. 我有一个代码,可以使用asp.net中的SMTP设置发送邮件。 That code is working well on live but when i am testing the same on localhost.
该代码在现场运行良好,但是当我在localhost上对其进行测试时。 It shows the error:
它显示错误:
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc.xyz.com
I know this is some configuration related error, but i don't know exactly what i need to change to test the same on localhost. 我知道这是一些与配置有关的错误,但是我不知道我需要更改什么才能在本地主机上测试相同的错误。 I have defined these attributes for SMTP:
我已经为SMTP定义了以下属性:
smtp.Host = "abc.server.net";
smtp.Port = 123;
smtp.EnableSsl = false;
fromEmail="any email";
password="password"
Any help would be appreciated. 任何帮助,将不胜感激。
You have to configure relay restrictions in the IIS admin. 您必须在IIS管理员中配置中继限制。 see this article
看这篇文章
try this 尝试这个
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.