Em****@Silico-Research.com (Emmett Power) wrote in message news:<6e**************************@posting.google. com>...
Hi,
I use Access to send emails through SMTP. I'd like to mirror the
process and retrieve emails from my SMTP/Pop3 server without the
intermediary of Outlook. I don't want to spend a lot of money on 3rd
party applications.
Can I do this through code or is there some reason why it is not
doable? I've hunted through the net but all I've got are references to
commercial applications. A pointer to sample code would be much
appreciated.
Thanks in advance for any help.
Regards
Emmett Power
Can I do this through code or is there some reason why it is not
doable?
Well, yes, it can be done through code, but at what level are you
talking about?
You can talk to wsock32.dll directly through ms-access's vba, but you
better have a pretty good knowledge of how sockets work, how api calls
are executed from vba (Dan Applemen's "Programmer's guide to the Win32
API"), how the windows api works (you have to process "socket
messages" I.E. events), and have more than just a few hours of spare
time. This level is surprisingly simple once and if you get there, but
getting there is very, very tricky. If you get there you still have to
write POP3 and SMTP protocols to send and receive and depending on
what you’re doing, MIME to encode and decode email.
You can skip talking to wsock32.dll directly by using a winsock .ocx.
MS makes one, and a shareware (free) one comes with Carl Franklin's
book "Visual Basic Internet Programming". It's a nice little control
named DsSock32.ocx, and he covers (with examples, cheesy, but
functional) the POP3 and SMTP protocols you'll need to use it. Leaving
only MIME (if you need it) to write, but like talking to wsock32.dll,
MIME is surprisingly simple once and if you get there, but getting
there is tricky.
It is my understanding that there is also POP3 and SMTP controls that
include MIME and function at the message level, just hand it the
message and a few other things and it does the rest. I'm so not an
expert on these, but there may be a cheap or free set around. (google
time)
Take care with any free controls that talk on the internet, people
that write them are not always nice, so keep an eye on your firewall
log when testing them out. In general, once your firewall allows a
control to access the internet, that control can do just about
anything the programmer of that control wants.
(very not good)
My recommendations would depend on your view of the time vs. money
issue so:
1) If you don't need MIME, DsSock32.ocx and Carl Franklin's book will
have you up and going in a weekend.
2) If you do need MIME, google for message level POP3 and SMTP
controls that includes it, all toll I have probably 4-6 weeks into
MIME over the years, so paying some money for a control may not be a
bad deal.
good luck