Sending email from access using cdo. Help!

J

james

Hi I am using the following code that I found on the web
(http://www.paulsadowski.com/WSH/cdo.htm).

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = "(e-mail address removed)"
objMessage.To = "(e-mail address removed)"
objMessage.TextBody = "This is some sample message text."
objMessage.Send

I have attached the above to a command button but when I click it the code
gets an error at objMessage.Send. It says it can't do it. Now it is at work
and we don't use outlook or outlook express, only lotus notes. I am presuming
that is the problem. How can I amend the above code to send a message (i
presume it needs to go through lotus notes somehow, I maybe wrong?)

Regards
 
T

Tom van Stiphout

On Wed, 17 Dec 2008 01:56:03 -0800, james

Type this in a search engine:
send email "Lotus Notes" vba
and you will find plenty of resources.

-Tom.
Microsoft Access MVP
 
R

Rick Brandt

Hi I am using the following code that I found on the web
(http://www.paulsadowski.com/WSH/cdo.htm).

Set objMessage = CreateObject("CDO.Message") objMessage.Subject =
"Example CDO Message" objMessage.From = "(e-mail address removed)"
objMessage.To = "(e-mail address removed)" objMessage.TextBody = "This is
some sample message text." objMessage.Send

I have attached the above to a command button but when I click it the
code gets an error at objMessage.Send. It says it can't do it. Now it is
at work and we don't use outlook or outlook express, only lotus notes. I
am presuming that is the problem. How can I amend the above code to send
a message (i presume it needs to go through lotus notes somehow, I maybe
wrong?)

Regards

No, CDO does not go through Outlook, Outlook Express, or Lotus Notes. It
does need a configuration that dictates which SMTP server to use. Did
you set that up?
 
T

Tony Toews [MVP]

james said:
Now it is at work
and we don't use outlook or outlook express, only lotus notes.

Microsoft Access Email FAQ - Lotus Notes
http://www.granite.ab.ca/access/email/lotusnotes.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top