Here at OrcsWeb our Managed Windows Hosting Solutions, paired with our famous “Remarkable Service. Remarkable Support“ go far beyond normal hosting. We often assist our managed clients – both Managed Shared Hosting and Managed Dedicated Hosting - in troubleshooting and minor fixing of their code. A common request we see is for a sample of how to send an email from code so clients can integrate that function into their web site.
Below is sample code showing how to send email from ASP.Net 4 using C#. With this code I am assuming that the server already has a local SMTP service installed, so I use “localhost” to relay the email.
I realized the source code was mangled by the CMS and I didn’t want a code sample sitting here that didn’t work due to missing brackets. So I moved the code to another page that is complete and supports a straight copy/paste of the same code. Here’s the link:
While you’re here on the site, be sure to check out some of our solutions. Our Windows Cloud Server Hosting is our latest and extremely popular. We also have Managed Shared Hosting for small businesses, and Managed Physical Dedicated Server Hosting.