How to Send Email Through a Gmail Account Using aspNetEmail and ASP.NET
- by Scott Whigham on June 2, 2009 4:31 PMI’m a big fan of aspNetEmail – I’ve used six or seven products from AdvancedIntellect through the years and never once have I been unhappy or wished it did more than it does. Great stuff – check it out here: http://www.aspnetemail.com/. I had to figure out today how to post through SSL today so that I could submit an email through one of my GMail accounts. It isn’t necessarily “native” to aspNetEmail to use secure servers but it is trivially easy to get it going. I thought I’d post it here if for no other reason that it would help me remember how to do it later! By the way, the rest of this post assumes you have downloaded aspNetEmail and have a license (it isn’t free but it’s worth the pittance they charge).
To use your Gmail account with aspNetEmail
Step 1: Go download the add-on AdvancedIntellect.Ssl.dll. It’s free and requires no registration
Step 2: Unpack the .zip file and follow the incredibly simple instructions – it’s literally TWO lines of code!
Step 3: Add a reference to both aspNetEmail and AdvancedIntellect.Ssl.dll to your project
Step 4: Code it up!
var mail = new EmailMessage { ValidateAddress = true };
// Fill in details such as To, From, Body, etc
// Gmail-specific:
mail.Server = "smtp.gmail.com";
var ssl = new AdvancedIntellect.Ssl.SslSocket();
mail.LoadSslSocket(ssl);
mail.Port = 587;
mail.Username = myGmailEmailAddress;
mail.Password = myGmailPassword;
mail.Send();
The two important lines are:
var ssl = new AdvancedIntellect.Ssl.SslSocket();
mail.LoadSslSocket(ssl);
Super easy – I love AdvancedIntellect :)
And by the way - check out our IT training videos blog while you’re here! We put lots of SQL videos, C# training videos, and more up there all the time.




I've been into blogging for quite some time and this is definitely a effective and well written post. I signed up for your newsletter and shared it with my other blogger friends, so please keep up the informative posts!
Good luck on your blog, and feel free to comment and subscribe to my blog as well when you get a chance: Make Money Online with Dino Vedo.
Thanks so much, and lets stay connected and maybe share some ideas, do some guest posts, and get us both some more traffic and backlinks!
All the best,
Dino Vedo
In fact, some of the Swiss luxury watch, in appearance and identity numbers are there, and done a lot of anti-counterfeiting
measures,. For example, Rolex has 5 numbers, they are: (1) case models, (2) Watch production sequence number
movement and on the number, (4) the movement and on the production sequence number, (5) the band number. In addition to the
band number in the band discount out surface, the rest are hidden, not to remove the watch strap or open the rear door in order to
see it.
Thanks for this great Article. Really great topic to write about on my Blog. I might set a link from another site.
Thanks for the valuable information
The most base service with Vonage is now $14.99/month with 500 free minutes (including Canada, but omits global calls), which is a solid deal unless you are constantly on the phone. All the services arrives with Voice Mail, Caller ID and something called “Network Availability Number”. The latter provides you to set a telephone number (i.e. for your cellular telephone) that calls will be forwarded to in the event that your broadband connection goes down.
Follow you dont have to reinvent the wheel
Iron Man, The Hulk Were awesome. Their my favorite characters from the avenger. The Avengers movies coming out soon i cant wait.