Click here to Skip to main content
15,906,341 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Using the code at[^], I revised the code with a valid email address and
SmtpClient client = new SmtpClient("");
When I run it it, got an InnerException: "The remote name could not be resolved: ''".
What was wrong I did? Thanks if you can help.

I re-checked and believed that the failure could be Firewall related. I used another piece of code sourced from[^]. This piece of code works well by launch our company's Outlook. Thanks to reviewers.
Share this answer
The remote name could not be resolved

In a command prompt, try to ping and see if this name is correctly resolved by DNS.
Check also the DNS configuration of your machine.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900