Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-08-2017, 01:50 AM
Drodz Drodz is offline UserForm Gmail CDO Windows 10 UserForm Gmail CDO Office 2016
Novice
UserForm Gmail CDO
 
Join Date: Oct 2017
Posts: 1
Drodz is on a distinguished road
Default 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!
Reply With Quote
Reply

Tags
userform gmail cdo



Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform calls other userform, then populate worksheet Lehoi Excel Programming 0 02-03-2016 02:58 PM
VBA Code in a UserForm module to delete a Command Button which opens the userform Simoninparis Word VBA 2 09-21-2014 03:50 AM
UserForm Gmail CDO Is it possible to take an input from a UserForm in one document to a UserForm in a do BoringDavid Word VBA 5 05-09-2014 09:08 AM
UserForm Gmail CDO Imap for gmail signsny Outlook 1 11-03-2010 02:31 PM
.pst to gMail? SpectrumRider Outlook 2 04-17-2010 12:01 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:58 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft