Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Email, FTP etc.: MAPI compared to SMTP 2003-08-08 -- Gus M. Creces Newsgroups: TopSpeed.Topic.Third_Party
Here's my experience - from the perspective of someone who uses both MAPI
and SMTP.
Each has a place and a reason for being.
MAPI has been around for quite some time. It's mainly a MS standard which MS
themselves don't always follow.
The idea of MAPI is that your application can control the MAPI-compliant
email client on your computer in order to send and receive emails. There is
a standardized set of (M)API calls that allow you to do this. 4-5 years ago
when our toolkit introduced MAPI classes and templates we did an extensive
survey to ascertain MAPI compliancy for various email clients out there. We
found various levels of compliancy, with only the MS products Outlook and
Outlook Express working 100 percent reliably and storing registry values in
a consistent way so that it was easy to determine which client was
installed, etc. etc.
Since MS has gone on it's security-above-all kick they've basically made
Outlook (I don't mean Outlook Express) totally useless as a MAPI client. It
still works but is a pain in the butt to use because of the nags that come
up and can't easily be made to go away. While Outlook used to work really
well via MAPI, I've been telling our users for over a year now to avoid it
like the plague if they possibly can.
Outlook Express, on the other hand, is - an continues to be - a marvellous
MAPI client and you can make it jump through hoops. Now to all those MAPI
nay sayers let's use a little imagination. So you don't use OE and nor do
your customers, you say. Ergo you're MAPI dead in the water, you say.
Consider that Outlook Express these days is really part of the operating
system. Just like Internet Explorer is part of the operating system. Despite
what the US Justice Department would have you believe. You have to work hard
NOT to get it installed with your XP or Win2K installations. Since it's
almost defacto nowadays, it's there whether you or your clients use it or
not. And it can be utilized by your applications for sending and receiving
purposes. Despite what you've been told, a MAPI email client is no harder
(or no easier) to configure than an SMTP client. In fact, the information
required to make either one work is identical - SMTP server and local email
address (for outgoing), POP server (if you want incoming) and Email account
name, and email account password (again to satisfy incoming mail
requirements).
If OE already has one or more email accounts set up, your MAPI program can
present a list of them to the user and ask which should be used, or it can
simply be made to use the default account. That being the case, your user
needs to do nothing to make your email work application work. If OE does not
have any accounts set up you have to provide instructions on how to
configure one or more OE accounts or you can simply pop up a Clarion dialog
window the way you would have to anyway for an SMTP configuration, and
collect the necessary email account information, drop it in the registry for
OE to use and you're off to the races. OE does not have to be your default
email client. It's easy enough to determine the default email client when
your app does its thing, swap it out for OE, do your thing with OE, and swap
it back. All of this could be done even with an existing default email
client running in the foreground or background.
So, to review, since O.E. is essentially a part of the operating system, you
can rely on it to be there, and warn if it isn't. You can configure it, and
use it in the background (or foreground) the way you use other operating
system features, DLLs and API's. It can send and receive and redirect as
necessary. It logs all incoming and outgoing mail for you at no extra
programming cost to you. (unlike SMTP) We've even figured out how to make it
into an email scrubber and how to make bulk mailings (where we don't
necessarily want every outgoing mail item logged into your outbox) go away.
Because it's also a NNTP newsgroup client you can treat newgroup messages
just as if they were mail, vetting, scrubbing, massaging them into standard
data bases. All this power comes built-in.
The CHT toolkit also has an SMTP implementation. SMTP has some advantages
when it comes to transport-style email and structured, HTML-style mail. But
configuration wise, it's no easier to get up and running than MAPI. In fact,
where we're presenting an SMTP configuation dialog, we generally look at the
Registry to see if Outlook or OE don't already have an account set up that
lists the SMTP server and local email address and we present that as a
starting point.
Which methodology you use is really tied the intended outcome required by
your application. Sometimes it's just a matter of personal preference. I use
both depending on intended use.
Cheers...
--
Gus M. Creces
The Clarion Handy Tools Page
http://www.cwhandy.ca
http://news.cwhandy.ca
gcreces@sympatico.ca
"Jono Woodhouse"
Excellent article! 2003-08-11 � Arnor Baldvinsson This is an excellent article on on the pros and cons of the SMTP and MAPI mail protocols. Arnor Today is November 21, 2024, 3:40 am This article has been viewed 35500 times. Google search has resulted in 1407 hits on this article since January 25, 2004.
|
|