VS2005 System.Net.Mail [英] VS2005 System.Net.Mail
本文介绍了VS2005 System.Net.Mail的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以提供有关如何为System.Net.Mail(针对VB)编码的明确答案吗?
我正在尝试解决"System.IO.IOException无法读取数据"的问题来自运输连接最近的服务器更新后出现的问题.该代码运行良好,直到前一天更新失败.
这是曾经起作用的代码:
Can someone provide a difinitive answer for how to code for System.Net.Mail (for VB)?
I'm tryng to resolve the "System.IO.IOException Unable to read data from the transport connection " that cropped up after a recent Server update. The code was working fine until an update came down the other day.
This is the code that used to work:
Dim MailClient As New SmtpClient(My.Settings.Server, My.Settings.Port)
MailClient.Credentials = New NetworkCredential(My.Settings.UserName, My.Settings.Password, My.Settings.Domain)
Dim ToAddr As String = Me.txtTo.Text.Replace(";", ",")
Dim CCAddr As String = Me.txtCC.Text.Replace(";", ",")
Dim msg As New MailMessage(Me.txtFrom.Text, ToAddr)<br/><span style="font-size:x-small"><p>MailClient.Send(msg)</p></span><br/>
推荐答案
第一组代码正确,我想通知您这不是程序错误.这是邮件服务器的DNS错误,如果您落后于ISP,例如{comcast,att,roadrunner等},这就是您的问题.不要灰心,您只需要提高自己的网络技能和交流技能即可.如果这不是DNS问题,也可能是由于中继设置不正确引起的.谢谢查理
The first set of code is correct and I would like to notify you that this is not a programmatic error. This is a DNS error with your mail server and if you behind an ISP like {comcast, att, road runner, and etc} this is your problem. Don't be discouraged you just need to brush up on your networking skills along with exchange skills. If this is not a DNS issue it could also be caused by incorrect relay settings. Thanks Charlie
这篇关于VS2005 System.Net.Mail的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文