1

它适用于特定的电子邮件地址,但其余电子邮件不起作用..出现以下错误:

Server Error in '/RealTimeArsenicDataVisualizer' Application.
Mailbox name not allowed. The server response was: From address not verified - see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html 

我的代码:

 System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("smtp.mail.yahoo.co.in", 587);

        client.UseDefaultCredentials = false;
     client.Credentials = new System.Net.NetworkCredential(emailid, password);

            client.Port = 587;

            client.Host = "smtp.mail.yahoo.co.in";

            client.EnableSsl = false;

            object userstate = msg;

            client.Send(msg);
4

1 回答 1

0

将您的代码更改为以下内容:

client.Port = 465;

client.Host = " smtp.mail.yahoo.com";
client.EnableSsl = true;
于 2012-09-29T15:30:27.983 回答