Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error (Remote Name Could Not Be Resolved) When Sending Email SMTP On Plex Hosting

I have purchase office 365 email service from godaddy

I wanted to send mail using console application. but when try below code i will get below errors 



IF i used port 443 : SocketException: No connection could be made because the target machine actively refused it


If i used port 587 : SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond


below is running code



MailMessage mail = new MailMessage(", "");
SmtpClient client = new SmtpClient();
client.Port = 25;//5061; 443; 25; 465; 587; 143;  993; 465;
//client.DeliveryMethod = SmtpDeliveryMethod.Network;
//client.UseDefaultCredentials = false;
//client.EnableSsl = false;
client.Credentials = new System.Net.NetworkCredential("", "password");
client.Host = "";//"";////"";// "";// "";
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body";
//mail.Bcc.Add(new MailAddress(ToEmail));


@onkarhadgaonkar - Please call GoDaddy Support at  (480) 505-8877 and they will be able to help you out with your error.