Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-access > #12129

Re: Have you sent email within Access via Gmail?

From Ron Weiner <rw@domain.com>
Newsgroups comp.databases.ms-access
Subject Re: Have you sent email within Access via Gmail?
Date 2016-10-04 14:35 -0400
Organization WorksRite
Message-ID <nt0sq6$eo7$1@dont-email.me> (permalink)
References <3f8b1759-11dd-42be-a8c7-ceae42fe760b@googlegroups.com>

Show all headers | View raw


Patrick Finucane formulated on Tuesday :
> I need to send some email via Gmail, not Outlook.  I came across this link.  
> http://www.blueclaw-db.com/access_email_gmail.htm  
>
> It looks pretty simple.  Here's the code.
>
> The line I am confused about is 
>   Set cdomsg = CreateObject("CDO.message")
>
> Do you know what version of CDO I use?  I am using Access 2013.
>
> Public Function send_email()
>
> Set cdomsg = CreateObject("CDO.message")
> With cdomsg.Configuration.Fields
> .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'NTLM 
> method .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = 
> "smtp.gmail.com" 
> .Item("http://schemas.microsoft.com/cdo/configuration/smptserverport") = 587 
> .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 
> .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True 
> .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") 
> = 60 .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = 
> "mygmail@gmail.com" 
> .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = 
> "mypassword" .Update End With ' build email parts
> With cdomsg
> .To = "somebody@somedomain.com"
> .From = "mygmail@gmail.com"
> .Subject = "the email subject"
> .TextBody = "the full message body goes here. you may want to create a 
> variable to hold the text" .Send
> End With
>     Set cdomsg = Nothing
> End Function 

Been using CDO for years ro send many hundreds of thousands of emails 
at work.  It has worked extremely well for me for years.  Here is a 
link to the origional code I wrote/stole more than a decade ago.
http://0173b9e.netsolhost.com/worksRite/CDOMail.htm

Since then I have discovered (wrote/stole) how to embed pictures(mostly 
Barcodes) directly into the message and use CSS to create attractive 
emails.

Rdub

Back to comp.databases.ms-access | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Have you sent email within Access via Gmail? Patrick Finucane <patrickfinucanetx@gmail.com> - 2016-10-04 06:36 -0700
  Re: Have you sent email within Access via Gmail? Patrick Finucane <patrickfinucanetx@gmail.com> - 2016-10-04 07:17 -0700
  Re: Have you sent email within Access via Gmail? Ron Weiner <rw@domain.com> - 2016-10-04 14:35 -0400
    Re: Have you sent email within Access via Gmail? Patrick Finucane <patrickfinucanetx@gmail.com> - 2016-10-05 07:58 -0700

csiph-web