Sending an email is different in both frameworks (.NET framework and ASP.NET framework), although the code of .NET framework would on ASP.NET too, but ASP.NET has a personal implementation of email sending frameworks and objects.
You simply need basic understanding of the SMTP protocol, how SMTP servers work and what is required by your SMTP server to send the emails (different providers have different standards and requirements for allowing the users to use their environment and resources to send emails).
I have a Gmail account that I use regularly, and for development purposes so in the following articles of mine, I have provided code that fits Gmail (and my conditions). You can use other providers also, I have used and tried others also and they work.
Sending Emails Easily Using ASP.NET Helpers[
^]
Sending emails over .NET framework, and general problems – using C# code[
^]
Convert the code from C# to VB.NET using
Telerik Converter.[
^].