我正在尝试使用带有godaddy的asp.net代码作为smtp服务器发送电子邮件,但在发送3-4电子邮件服务器后停止发送邮件并给出错误“传输无法连接服务器”。我有一个aws帐户,并尝试发送smtp服务器作为godaddy“。但相同的代码我在我的本地计算机上运行,没有问题。
请帮忙! 下面是我的代码:
MailMessage email = new MailMessage();
email.BodyFormat = MailFormat.Html;
email.From = "testing@ppms.in";
email.To = "ashish@techmagnate.com";
//email.Cc = "tasauwar.ansari@techmagnate.in;";
email.Subject = "Testing";
email.Body = "test";
email.Priority = MailPriority.High;
// End of attachments processing
// Set the SMTP server and send the email
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "smtpout.secureserver.net");
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "25");
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", "2");
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "testing@ppms.in");
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password");
email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "false");
SmtpMail.SmtpServer = "smtpout.secureserver.net";
SmtpMail.Send(email);