UserForm Gmail CDO
I am using a userform with this code ...
Private Sub CommandButton3_Click()
Dim objMessage
Dim objConfig
Dim Flds
Set objMessage = CreateObject("cdo.message")
Set objConfig = CreateObject("cdo.configuration")
Set Flds = objConfig.Fields
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com" 'chose smtp server
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "******@gmail.com"
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "****"
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
...to send email thru a userform. This works perfect on the client based PCs we use at work and my personal PC at home, but when I try to use it on the "user login based" pcs at work it lags and never sends the email. I though it had to do with the "addins/references" in vba but after adding them it still doesn't work. Any help is appreciated. Thank you much!
|