我正试图寄出邮件,但该守则引起错误,“拖延失败”
MailMessage MailMesaji = new MailMessage();
MailMesaji.Subject = "subject";
MailMesaji.Body = "mail body";
//MailMesaji.BodyEncoding = Encoding.GetEncoding("Windows-1254"); // Turkish Character Encoding
MailAddress mdrom = new MailAddress("amit.pandey@verydindai.com");
MailMesaji.From = mdrom;
MailMesaji.To.Add(new MailAddress("govind@verydindai.com"));
System.Net.Mail.SmtpClient Smtp = new SmtpClient();
Smtp.Host = "mail.verydindai.com"; // for example gmail smtp server
Smtp.EnableSsl = true;
Smtp.Port = 465;
Smtp.Credentials = new System.Net.NetworkCredential("amit.pandey", "1234567");
Smtp.Send(MailMesaji);
pl子告诉我解决办法吗? 以及是否有另一种解决办法告诉我?