Connecting Tech Pros Worldwide Help | Site Map

Access - Email

florys@ptd.net
Guest
 
Posts: n/a
#1: Nov 13 '05
Hi,
First I would like to say thanks in advance for any help offered.

i am creating a customer database, when needed i have to have the
ability to click on a client and maybe hit a send email button/link
that will send that client a generic email.

I know this is possible, I just can't figure out how, my hosting does
not support cdonts so i have to use cdo


Again, thanks

Lizz

lylefair
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Access - Email



florys@ptd.net wrote:[color=blue]
> Hi,
> First I would like to say thanks in advance for any help offered.
>
> i am creating a customer database, when needed i have to have the
> ability to click on a client and maybe hit a send email button/link
> that will send that client a generic email.
>
> I know this is possible, I just can't figure out how, my hosting does
> not support cdonts so i have to use cdo
>
>
> Again, thanks
>
> Lizz[/color]

Hmmm ... I hope this isn't for spam!

Option Explicit

Public Sub VerySimpleSendMailWithCDOSample()
' requires reference to cdosys.dll

Dim iCfg As CDO.Configuration
Dim iMsg As CDO.Message

Set iCfg = New CDO.Configuration
Set iMsg = New CDO.Message

With iCfg.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPServer) = "smtp.mail.yahoo.ca"
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "lylefair"
.Item(cdoSendPassword) = "ThePassWord"
.Item(cdoSendEmailAddress) = "Lyle Fairfield
<lylefair@yahoo.ca>"
.Update
End With

With iMsg
.Configuration = iCfg
.Subject = "Test"
.To = "lylefairfield@aim.com"
.TextBody = "Test"
.Send
End With
End Sub

florys@ptd.net
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Access - Email


No it is not for spam, I am a site designer starting to dabble in
database devolpment. This is for a customers site, he wants to be able
to log into members area of his site and from there search client
database and then send client generic email stating their order is in
to pick it up ...... easier i guess then placing a phone call
....................... thank you I will try that code.

Douglas J. Steele
Guest
 
Posts: n/a
#4: Nov 13 '05

re: Access - Email


See whether there's anything of use to you in the Access EMail FAQ Tony
Toews has at http://www.granite.ab.ca/access/email.htm

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



<florys@ptd.net> wrote in message
news:1130288302.715710.125760@g14g2000cwa.googlegr oups.com...[color=blue]
> Hi,
> First I would like to say thanks in advance for any help offered.
>
> i am creating a customer database, when needed i have to have the
> ability to click on a client and maybe hit a send email button/link
> that will send that client a generic email.
>
> I know this is possible, I just can't figure out how, my hosting does
> not support cdonts so i have to use cdo
>
>
> Again, thanks
>
> Lizz
>[/color]


John Sheppard
Guest
 
Posts: n/a
#5: Nov 13 '05

re: Access - Email


Are you wanting to send from a website?

Access is a desktop application, you cannot run any code from it on your
browser.

You will have to find out what email software is installed on your host, 99%
of hosting companies have some form of email component you can use.

John

<florys@ptd.net> wrote in message
news:1130315149.957875.285430@g43g2000cwa.googlegr oups.com...[color=blue]
> No it is not for spam, I am a site designer starting to dabble in
> database devolpment. This is for a customers site, he wants to be able
> to log into members area of his site and from there search client
> database and then send client generic email stating their order is in
> to pick it up ...... easier i guess then placing a phone call
> ...................... thank you I will try that code.
>[/color]


lylefair
Guest
 
Posts: n/a
#6: Nov 13 '05

re: Access - Email


THe code I posted works perfectly well from a (MS owered) website, and
simply has to be ported to VB Script or JScript within ASP. In fact,
that's where it originated. Of course, objects may have to be created
rather than referenced.

florys@ptd.net
Guest
 
Posts: n/a
#7: Nov 13 '05

re: Access - Email


ok dumb question i'm sure, but where does that code go that lylefair
gave me.

Again thanks for helping
Lizz

lylefair
Guest
 
Posts: n/a
#8: Nov 13 '05

re: Access - Email


hmmm
have you previously used VBA code?

If so, just put the code in a standard module if you want to be able to
call it from wherever.
If you want it private to your form, put it in the form's module.

if you haven't previously used VBA code, you may need to post back and
get bit more help.

Closed Thread