Vikas Panwar

Vikas Panwar

  • 887
  • 1.8k
  • 1.3k

Operation Timeout Error when Sending Email In C# Via GoDaddy Mail

Nov 13 2021 9:25 AM

I want to send email thorw my godaddy email Server, I using this code 

   MailMessage msg = new MailMessage();
            MailAddress address = new MailAddress("");
            msg.From = address;
            msg.Subject = "Email";
            string htmlBody = @"
                <!DOCTYPE html>
                    <h1> Hi welcome </h1>
                    <p> Thank you for register</p>

            msg.Body = htmlBody;
            msg.IsBodyHtml = true;
            SmtpClient client = new SmtpClient();
            client.Host = "";
            client.Port = 465;
            client.UseDefaultCredentials = false;
            client.Credentials = new System.Net.NetworkCredential("", "password");
            //Send the msg


But its shows operation timeout error.

Answers (1)