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?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Ron Weiner <rw@domain.com>
Newsgroups comp.databases.ms-access
Subject Re: Have you sent email within Access via Gmail?
Date Tue, 04 Oct 2016 14:35:50 -0400
Organization WorksRite
Lines 46
Message-ID <nt0sq6$eo7$1@dont-email.me> (permalink)
References <3f8b1759-11dd-42be-a8c7-ceae42fe760b@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset="iso-8859-15"; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Tue, 4 Oct 2016 18:35:50 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="f01ba6e8df0b056f57adb869d424f574"; logging-data="15111"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/eIm6bmotqu11pJZayVJMI"
X-Newsreader MesNews/1.08.06.00-gb
Cancel-Lock sha1:D6sm8GsoWoI1pA0vmoMW3JiElHk=
X-ICQ 1701145376
Xref csiph.com comp.databases.ms-access:12129

Show key headers only | 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