我的程序如下:
System.Web.Mail.MailMessage mail=new MailMessage();
SmtpMail.SmtpServer="smtp.163.com";
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","1");
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername","sqfeiyu");
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword","******"); (登錄密碼)
mail.From ="[email protected]";
mail.To ="[email protected]";
mail.Subject="test";
mail.Body ="asdfasdf";
SmtpMail.Send(mail); 為什么發不出呢?
System.Web.Mail.MailMessage mail=new MailMessage();
SmtpMail.SmtpServer="smtp.163.com";
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","1");
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername","sqfeiyu");
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword","******"); (登錄密碼)
mail.From ="[email protected]";
mail.To ="[email protected]";
mail.Subject="test";
mail.Body ="asdfasdf";
SmtpMail.Send(mail); 為什么發不出呢?
确定smtp.163.com为你提供服务吗??
------------------------------
不是这样的吧.
我用过类似的写法,不过我哪会用的是Tom.Com提供的免费邮箱.
-------------------
应该不是这样的.
我也用过类似的写法,是可以实现的
不过我用的Tom.Com的邮箱