VB.net and GMAIL

Is anyone using gmail SMTP to send trade confirmation ?
if so can you paste your code ? ( of course without the login information )
thanks
 
mail.To = "myaccount@gmail.com"
mail.From = "myaccount@gmail.com"
mail.Subject = "Trade Execution Report"
mail.Body = execLine & " " & execTime
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1") 'basic authentication
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "myaccount@gmail.com") 'set your username here
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password") 'set your password here
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "465") 'Put port number here
SmtpMail.SmtpServer = "smtp.gmail.com" 'your real server goes here
SmtpMail.Send(mail)
MsgBox("mailsent")

i did couple test trades. but i have no idea if indeed my program sent the mail thru gmail smtp. is it because i picked the wrong smtpauthenticate ?
 
Back
Top