亲爱的朋友,
昨天,我已发送邮件,使用它走了,垃圾邮件给我的朋友的邮件ID作为主机succesfully.but smtp.aol.com。
我所使用的编码是
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress("sanjithbtech@aol.com", "sanjith");
message.From = fromAddress;//here you can set address
message.To.Add("tamilselvank@i3itpeople.com");//here you can add multiple to
message.Subject = "Feedback";//subject of email
message.CC.Add("cc@site.com");//ccing the same email to other email address
message.Bcc.Add(new MailAddress("bcc@site.com"));//here you can add bcc address
message.IsBodyHtml = false;//To determine email body is html or not
message.Body = @"Plain or HTML Text";
smtpClient.Send(message);
}
catch (Exception ex)
{
//throw exception here you can write code to handle exception here
}
System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient();
//This object stores the authentication values
System.Net.NetworkCredential basicCrenntial =
new System.Net.NetworkCredential("sanjithbtech@aol.com", "bmbitsba");
mailClient.Host = "smtp.aol.com";
mailClient.UseDefaultCredentials = false;
mailClient.Credentials = basicCrenntial;
mailClient.Send(message);
lblStatus.Text = " Send Successfully!";
但是当我通过发送早上相同的编码,它显示以下错误
{C}
请告诉我这个coding.what端口的问题,我有,use.or任何其他的解决方案。
:7976636 |会员