My Great World

Nothing impossible

博客园 首页 新随笔 联系 订阅 管理
在使用dotnet自带的mail类发送邮件的时候,因为默认的smtp端口是25,如果更改了smtp的端口号,则需加上
MailMessage msg = new MailMessage();
msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "端口号")

posted on 2006-04-03 22:06  My Great World  阅读(176)  评论(0编辑  收藏  举报