Click here to Skip to main content
15,878,231 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Using the code at https://support.gearhost.com/entries/23715048-ASP-NET-form-to-email-example[^], I revised the code with a valid email address and
SmtpClient client = new SmtpClient("mail.myCompany.com");
When I run it it, got an InnerException: "The remote name could not be resolved: 'mail.myCompany.com'".
What was wrong I did? Thanks if you can help.
Posted

I re-checked and believed that the failure could be Firewall related. I used another piece of code sourced from http://social.msdn.microsoft.com/Forums/en-US/95857c70-5af4-4075-9f1e-14134fec7be6/open-default-email-program-outlook-for-example-when-pressing-a-link?forum=vblanguage[^]. 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 mail.mycompany.com 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