ASP .NET 2.0 Email问题
ML.From = New MailAddress( "frEmail ", "frName ")
.
.
.
MailSmtp = New SmtpClient( "smtp ")
MailSmtp.UseDefaultCredentials = True
MailSmtp.Timeout = 200000
MailSmtp.Credentials = New Net.NetworkCredential( "userName ", "pw ")
MailSmtp.Send(ML)
以上是发送邮件的一部分代码,我想问一下:
"frEmail "是否一定要和 "userName "的邮箱一致?
我原来设定的是不一致,可以发送.比如:
"frEmail "= "123@abc.com "
"userName "= "456 ", "pw "= "xxxx ", "smtp "= "mail.name.com "
但以上的设置今天不能工作了,改为 "frName "和 "userName "一直的设置才可以.比如:
"frName "= "123@abc.com "
"userName "= "123 ", "pw "= "yyyy ", "smtp "= "mail.abc.com "
------解决方案--------------------看你的 smpt server 要求
————————————————————————————————————
写作,虽然每个人都会查阅辞海,可,不是人人都能写出不朽的篇章的。编程,如是也。