首页 新闻 会员 周边

C# SMTP发送邮件的问题~~~~在线等候.

0
悬赏园豆:200 [已解决问题] 解决于 2008-09-27 17:22

说明,在我的机器上面是可以发邮件的,我的机器配置:XP Sp2+.NET 2.0 sp1+IIS 5.x.

邮件可以正常发送.

 

但是放在运行环境:Win2000+.NET 2.0 sp1 +IIS 版本未知.就死活都发不出来右键.

下面是异常信息:


未处理的异常:  System.Net.Mail.SmtpException: 发送邮件失败。 ---> System.IO.IOEx

ception: 无法从传输连接中读取数据: net_io_connectionclosed

   System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 of

fset, Int32 read, Boolean readLine)

   System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, B

oolean oneLine)

   System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller)

   System.Net.Mail.SmtpReplyReader.ReadLine()

   System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)

   System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)

   System.Net.Mail.SmtpClient.GetConnection()

   System.Net.Mail.SmtpClient.Send(MailMessage message)

   --- 内部异常堆栈跟踪的结尾 ---

   System.Net.Mail.SmtpClient.Send(MailMessage message)

   GetInfo_NJ.Mail.Send(String subject, String body)

   GetInfo_NJ.Program.ChooseDBServer(String[] args)

   GetInfo_NJ.Program.Main(String[] args)

问题补充: IIS已经启动,SMTP已经启动,别人通过system32下面的一个com组件就可以发邮件,就是我的.NET 2.0的不行.
egmkang的主页 egmkang | 初学一级 | 园豆:-734
提问于:2008-09-27 15:29
< >
分享
最佳答案
0

SmtpClient  client = new.....client.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;

kevin002 | 菜鸟二级 |园豆:500 | 2008-09-27 16:01
其他回答(2)
0

看看验证方式

zjy | 园豆:3194 (老鸟四级) | 2008-09-27 16:19
0

是不是该机器的Simple Mail Transfer Protocol (SMTP)服务没有启动.

加冰的可乐 | 园豆:410 (菜鸟二级) | 2008-09-27 16:33
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册