当前位置:编程学习 > C#/ASP.NET >>

我今天写一段代码可是报错

 MailMessage m = new MailMessage();

            m.From = textBox3.Text;
            m.Subject = textBox2.Text;
            m.To = textBox1.Text;
            m.Body = textBox4.Text;
            m.Priority = MailPriority.High;
            m.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1);
            m.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "lizhiling85@tom.com"); //发送方邮件帐户
            m.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "*******"); //发送方邮件密码

            SmtpMail.SmtpServer = "smtp.tom.com";
            SmtpMail.Send(m);
为什么邮件发不出去,,,请高手指点一下 --------------------编程问答-------------------- 难道新手就这么容易被忽视吗 --------------------编程问答-------------------- 换其他邮箱如google,qq试试,smtp可能不支持
或用jmail --------------------编程问答-------------------- 我用gmail也就是Google的邮箱发送成功过,你可以试试。
补充:.NET技术 ,  .NET Framework
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,