In one of my Application called Exxecutive (secret !) I wanted to send email to my clients using my Gmail Account. I wanted to make sure Gmail keeps a copy of my sent emails. If I use SMTP provided by Microsoft IIS, Gmail doesn’t come in the picture. After doing some research I wrote a function that will use Gmail’s SMTP server and send email and also keep a copy in the send mail folder. This function uses .NET’s Mail Namespace.

It is important to note here that Gmail uses port 587 (a new preferred port for mail submission) and SSL