Last night I was thinking to write a small post about sending emails using .NET. Then I thought of using GMAIL smtp account to send email. So here is the code.
using System; using System.Net; using System.Net.Mail;
/// <summary> /// Email Sending Class for GMAIL account. /// </summary>
Now from here you can call this class and send email. I have used the static emails here but you can make it change accordingly to use it as dynamically. You will need to add more paramaters like "body" in calling this function.
Thanks.
Be the first to rate this post
Tags:
Beginners
Powered by BlogEngine.NET 1.4.5.0 Theme by Mads Kristensen
Hi, I am Mohit Bhardwaj, living in New Delhi, India. I am an Independent software developer for Microsoft Technologies.
Hope you will like my posts here on this blog.