MailMessage newmail=new MailMessage();
newmail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",1);
newmail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername","icmlc2006");
newmail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword","********");
newmail.To="[email protected]";
newmail.From="[email protected]";
newmail.Subject="hello";
newmail.BodyFormat=MailFormat.Html;
newmail.Body="这是我发送的第一个邮件程序";
SmtpMail.SmtpServer="smtp.126.com";
SmtpMail.Send(newmail);
我用上面的方法发送信件,可是返回的错误是:
The server rejected the sender address. The server response was: 553 You are not authorized to send mail, authentication is required 
我不想用第3方控件实现,请问上面的问题怎么解决?