From: mayayana on
> and it looks like there's a lot missing!
>

You might want to rad this:
http://en.wikipedia.org/wiki/Messaging_Application_Programming_Interface

MAPI/CDO are options built into Windows.
I don't know offhand which systems support
which. I know that scripters often use CDO
for emailing, but it's not installed on all
systems.
If you want to use either of those you should
probably do some research to be clear about
dependencies and support limitations. The code
you downloaded is a barebones syntax example
that's pretty much useless.

Emailing involves carrying out a text-based
conversation with an SMTP server. (Your email
program talks to smtp.somewhere.com, for
instance.) If you use high-level objects you don't
need to deal with the actual server conversation.

On the other hand, if you want to reduce
dependencies you can contact the SMTP server
directly from your software, using winsock.
See here for a dependency-free UserControl:

http://www.jsware.net/jsware/vbcode.php5#mail

There's also a similar thing called vbSendMail,
but that requires using/shipping the VB winsock
OCX file.

So there are a number of possible levels of
wrappers, or lack thereof -- from a direct
SMTP conversation that you carry out yourself,
all the way up to automating Outlook (if that's installed).
And you can also buy emailing components. Or
see here for a free one that's a compiled version
of the link above:

http://www.jsware.net/jsware/scripts.php5#mailer

But all of those options require that you use an
external SMTP server. From your post I assume you
plan to do that, but that's not actually what you said.
In other words, when you send an email you log into
an account at smtp.somewhere.com, passing your
username and usually a password. In distributed
software you'd need to either get those values from the
person who installed the software, or use you own.

If you don't email through some kind of external
email account then you need to write your own
SMTP server, which is a whole different thing. OE is
not an SMTP server. It's only a program that carries
out the conversation with the server.


From: GS on
Hi Jim,

Sorry you couldn't get it working. It runs fine on my machine but I
can't remember if I had to tweak it some or not.

Yes, it is rather old but that gave me a start and so I thought it might
do the same for you. Actually, mayayana makes some great suggestions
that are worth looking at. I especially like the non-dependency approach.

As for the html scolding; -I was not aware this was happening because of
the way my reader displays messages. I prefer using plain text here
because code samples (which display better in plain text) are often
provided. It's a non-issue with me but I don't want to raise any
controversy with anyone so I don't mind being told. Also, the scolder
likes picking on me whenever he gets a chance (historically speaking),
so I'm sure it will happen again!

HTH
Kind regards,
Garry

From: Tony Toews [MVP] on
"Jim Bunton" <jBunton(a)BlueYonder.co.uk> wrote:

>I'm actualy using Visual Basic for Applications in Access 2000 Windows XP
>[Tried the access group and only got the reply (buy) and use our smtp
>server]

Sorry, I"ve been ignoring the newsgroups a bit lately.

Microsoft Access Email FAQ
http://www.granite.ab.ca/access/email.htm

>I would like to send and email messages directly from vb code without first
>installing a third party smtp server.
>
>I use OutlookExpress for normal emails BUT my users may not!
>
>I simply want to bypass any installed general mail application installed and
>not effect it any way.

If you don't need attachments MAPI is, I think, a nice universal
solution. Mind you that won't give you HTML formatted emails.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/