copy the following code.. its working for my gmail account
in web.config
<system.net>
<mailSettings>
<smtp from="youremail@gmail.com">
<network host="smtp.gmail.com" port="587" userName="youremail" password="xx" defaultCredentials="false"/>
</smtp>
</mailSettings>
</system.net>
In code behind ( on button click)
Dim smtp As New System.Net.Mail.SmtpClient()
Dim smail As New System.Net.Mail.MailMessage
smail.To.A ...
Go to the complete details ...