Try this one, it works for me:

VB Code:
  1. With Flds
  2.           .Item(cdoSendUsingMethod) = 2 'cdoSendUsingPort 'remote server
  3.           .Item(cdoSMTPServer) = "smtp.gmail.com"
  4.           .Item(cdoSMTPServerPort) = 465
  5.           .Item(cdoSMTPUseSSL) = True
  6.           .Item(cdoSMTPConnectionTimeout) = 30 'timeout
  7.           .Item(cdoSMTPAuthenticate) = cdoBasic
  8.           .Item(cdoSendUserName) = "" 'user
  9.           .Item(cdoSendPassword) = "" 'password
  10.           .Item(cdoURLGetLatestVersion) = True
  11.           .Update
  12.     End With
  13.        
  14.     With iMsg
  15.             Set .Configuration = iConf
  16.             .To = txtTo.Text
  17.             .From = txtFrom.Text
  18.             .Subject = txtSubject.Text
  19.             .TextBody = txtMain.Text
  20.             Me.MousePointer = 11
  21.             .Send
  22.             Me.MousePointer = 0
  23.     End With

Hope this helps.