信箱不可用.服务器响应是:需要身份验证

use*_*940 2 authentication smtp

我想向我的网络应用程序的1000多个用户发送邮件.我正在购买新的smtp服务计划.我使用以下代码发送电子邮件.

System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
  message.From = new MailAddress("info@mydomain.com", "Web Administration Team");
  message.To.Add(new MailAddress("user1@gmail.com"));
  message.Subject = "test";
  message.Body = "Email Content";
  message.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient("domain.smtp.com", 2525);           
  smtp.UseDefaultCredentials = false;
  smtp.DeliveryMethod = SmtpDeliveryMethod.Network;            
  smtp.EnableSsl = false;
  smtp.Credentials = new System.Net.NetworkCredential("info@domain.com","password");           
  smtp.Send(message);
Run Code Online (Sandbox Code Playgroud)

但我收到以下错误消息.

信箱不可用.服务器响应是:需要身份验证.如果您在成功验证时遇到问题,请联系支持部门(support@smtp.com)

Bar*_*mar 8

SMTP服务器需要用户名和密码进行身份验证,以确保只有客户通过它发送垃圾邮件.

有关如何在使用System.Net.Mail时进行身份验证,请访问http://www.systemnetmail.com/faq/4.2.aspx.