cancel
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 dot.net console application. but when try below code i will get below errors 

 

Error:

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

 

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 173.201.193.101:587

 

below is running code

 

 

MailMessage mail = new MailMessage("abc@abc.com, "xyz@xyz.com");
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("abc@abc.com", "password");
client.Host = "relay-hosting.secureserver.net";//"autodiscover.outlook.com";////"smtp.gmail.com";// "smtpout.secureserver.net";// "relay-hosting.secureserver.net";
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body";
//mail.Bcc.Add(new MailAddress(ToEmail));
client.Send(mail);

1 REPLY 1

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

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