In an asp.net mvc application I am trying to send email using gmail smtp and for that I have used these setting
SmtpClient smtpClient = new SmtpClient("smtp.gmail.com", Convert.ToInt32(587));
System.Net.NetworkCredential credentials = new System.Net.NetworkCredential("my-emial", "app-pass");
smtpClient.Credentials = credentials;
smtpClient.EnableSsl = true;
smtpClient.Send(msg);
It is working fine on local server but not working on godaddy server. On godaddy server it show this error
An attempt was made to access a socket in a way forbidden by its access permissions 142.251.16.108:587