0

i am trying to send email using asp.net code with godaddy as smtp server, but after sending 3-4 email server stop sending mail and give error "transport failed to connect server". i have a aws account and try to send smtp server as godaddy". but same code i run on my local computer and there is no issue.

Please help! below is my code:

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);
Sharmaji TM
  • 199
  • 1
  • 13

0 Answers0