向smtp发送邮件失败

程序在尝试通过SMTP发送邮件时遇到错误'net_io_connectionclosed'。问题源于SMTP服务器设置变动,通过网络搜索找到了解决方案。
摘要由CSDN通过智能技术生成

今天,我的程序向smtp发送邮件失败,得到错误

Unable to read data from the transport connection: net_io_connectionclosed.

原来程序工作正常,,找了半天,发现是smtp的设置修改了,在网上找到了答案:

What this error means is that System.net.mail was unable to find the smtp server.

The answer will vary depending on whether you have a fixed IP or a dynamic IP but,
basically, you need to assign a valid IP to your smtp server.

With fixed IP's this is relatively straightforward.
With dynamic IP's it takes a bit of tweaking.

Open the IIS Manager and check the properties for the smtp server.

In the Default SMTP Virtual Server's properties, in the "Access" tab,
in the Connection Control and Relay dialogs, make sure that your local IP is assigned.
( In my case, it's 10.0.0.2... )

You may

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值