Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SMTP vs Mapi

0 views
Skip to first unread message

Robert Parrish

unread,
Jan 23, 2005, 6:15:09 PM1/23/05
to
There seems to be a difference of opinion whether to use smtp or mapi for
sending email (single and bulk) from a Delphi app. I'm currently using Indy
Smtp. What would be my advantage to switch to Mapi? TIA

Bob Parrish


Olivier Beltrami

unread,
Jan 23, 2005, 9:34:59 PM1/23/05
to

MAPI has the advantage that you are invoking the default email client of
your users, which presumably is setup to get around all the firewall and
proxy stuff (most important for corporate users). With SMTP you always run
the risk of you emails not being able to leave the user's PC.

However, MAPI relies on the user having a default email client setup, having
it setup properly, and of course, if the user does not click on the SEND
button, the email also goes nowhere. Also, the levele of control in MAPI
seems less than the level of control a developper has with SMTP.

I always implement both. I use SMTP by default, and propose MAPI to the user
if the outbound email fails.

Olivier Beltrami
-
Bank Holidays, Dates and Calendar Related Links :
http://www.qppstudio.net/worldholidays.htm
http://www.qppstudio.net/freeware.htm


Johnnie Norsworthy

unread,
Jan 24, 2005, 12:20:43 AM1/24/05
to
"Olivier Beltrami" <obeltrami at wanadoo dot fr> wrote in message
news:41f45ee3$1...@newsgroups.borland.com...

> However, MAPI relies on the user having a default email client setup,
> having
> it setup properly, and of course, if the user does not click on the SEND
> button, the email also goes nowhere. Also, the levele of control in MAPI
> seems less than the level of control a developper has with SMTP.

I finally have given up on both MAPI and SMTP, as it has been impossible to
configure to work past anti-virus software, ISP blocking of SMTP, firewalls,
etc. I hear weekly how my program has "stopped sending emails", when of
course, nothing in my program has changed. Then I have to spend a generous
part of my day diagnosing the problem.

So I wrote a simple ASP.NET web service that I use that ends up actually
sending the email from my web server. Since it is a web service all it needs
is HTTP port access which most users don't lock out. It works great in my
tests and after I add some authentication of my application's sites I'll be
putting it into production this week.

-Johnnie


Pete

unread,
Jan 24, 2005, 9:27:42 AM1/24/05
to
On Sun, 23 Jan 2005 21:20:43 -0800, Johnnie Norsworthy wrote:

> I finally have given up on both MAPI and SMTP, as it has been impossible to
> configure to work past anti-virus software, ISP blocking of SMTP, firewalls,
> etc.

I'd be interested in hearing more about your MAPI problems. I'm about to
release an update of my app with MAPI added, and I don't want to create a
support headache for myself.

So far, I haven't had trouble as long as I don't specify a sender or
recipient in the MAPI call to the email client (where they are added). I
*am* specifying attachments.

Pete

Johnnie Norsworthy

unread,
Jan 24, 2005, 10:44:10 AM1/24/05
to
"Pete" <nob...@nowhere.com> wrote in message
news:1ggyhhnsmaejd.128jslxzbgi4e$.dlg@40tude.net...

MAPI was a site configuration problem for me. On "public" machines in any
given customer office they may not have a default email account set up.
There is no certainty of any common denominator working anywhere unless you
impose that requirement, and I have found that telling the customer they
have to set up a default email account on every computer to use my software
not a very good idea.

So right now I use SMTP, with either my mail server or one their ISP
provides. I'll be switching to a web service this week, which I believe will
be the one homogenous solution.

-Johnnie


a

unread,
Jan 30, 2005, 9:33:14 PM1/30/05
to
Robert,

SMTP
Pros:
* Small, fast, and built into the application.
* Does not require an specific software to be installed on any client
machine.
* Does not fail because of misconfiguration of software.
* Does not run into Microsoft security systems.
* Application can run without reliance on 3rd-party software.
* Can run from within a service.
* Can sent even when the client application isn't running.

Cons:
* May run into issues connecting to firewalls.
* Does not provide an audit trail of outgoing e-mail messages. i.e. no sent
items box for the client to verify things.
* Does not have any interface to the e-mails. You can't display or provide
edit prompts to end-users without writing your own e-mail client.

MAPI
Pros:
* Provides an interface you can use. I.e. order it to display an e-mail with
HTML/RTF/Plain-text support, attachments, etc.
* Provides an outbox and sent-items for an audit trail of outgoing e-mails.
Cons:
* Comes in different "versions" which aren't necessarily compatible. Clients
which have Eudora, Exchange, or (ugg..) Lotus Notes. Many fail to support
MAPI correctly or certain parts. You end-up debugging clients email set-up.
* Many MAPI connectors initialize MAPI on application start-up (static
link DLLs) which fail if a MAPI client isn't installed.
* Many Microsoft MAPI systems now consider applications making MAPI
calls to be "unsecure" and force prompts unless you are using 'Extended
MAPI' almost nothing other than MS correctly support this and it's a real
programming nightmare.
* Very hard to get Extended MAPI (and impossible to get MAPI) working
from a service.
* In most cases, simple MAPI will not actually send unless Outlook is
running (and someone actually presses Send) on the client.
* Because MAPI requires client software, the same application running on
10 workstations is ten times more likely to fail to send and e-mail --
because
someone's workstation will have problems.

IMO, while supporting both is nice, SMTP is less trouble than MAPI.
SMTP is pretty universal. MAPI run into every possible client mis-
configuration issue which you really don't want to trouble-shoot anyway.

Thanks,

Brett


Mike Shkolnik

unread,
Jan 31, 2005, 12:45:08 AM1/31/05
to
Friends,

do you know any mail-server that doesn't require the autorization? Why you
use the SMTP if most mail-servers now requires the additional authorization
(POP3 before SMTP, for example)? This is a main cons for SMTP mailing...

All sample code for mailing (SMTP) that I saw in the net, will not work at
all (no matter - sockets, Indy, ICS etc).

--
With best regards, Mike Shkolnik
E-mail: mshk...@scalabium.com
WEB: http://www.scalabium.com

"a" <blwa...@shaw.ca> wrote in message
news:41fd98e7$1...@newsgroups.borland.com...

Mohamed Al Zayani

unread,
Jan 31, 2005, 1:11:52 AM1/31/05
to
Mike Shkolnik wrote:
> Friends,
>
> do you know any mail-server that doesn't require the autorization? Why you
> use the SMTP if most mail-servers now requires the additional authorization
> (POP3 before SMTP, for example)? This is a main cons for SMTP mailing...
>
> All sample code for mailing (SMTP) that I saw in the net, will not work at
> all (no matter - sockets, Indy, ICS etc).
>
> --
> With best regards, Mike Shkolnik
> E-mail: mshk...@scalabium.com
> WEB: http://www.scalabium.com
>
> "a" <blwa...@shaw.ca> wrote in message
> news:41fd98e7$1...@newsgroups.borland.com...
>

you can use SMTP service that comes with win2000/xp as mail-server

Nicholas Ring

unread,
Jan 31, 2005, 1:14:27 AM1/31/05
to
Pete <nob...@nowhere.com> wrote in
news:1ggyhhnsmaejd.128jslxzbgi4e$.d...@40tude.net:

> On Sun, 23 Jan 2005 21:20:43 -0800, Johnnie Norsworthy wrote:
>
>> I finally have given up on both MAPI and SMTP, as it has been
>> impossible to configure to work past anti-virus software, ISP
>> blocking of SMTP, firewalls, etc.
>
> I'd be interested in hearing more about your MAPI problems. I'm about
> to release an update of my app with MAPI added, and I don't want to
> create a support headache for myself.

One MAPI problem I had was with Outlook 2003. Any message body I specified
was replaced with a hidden attachment - the message body is quite visible
once the email has been received. Very frustrating, so what I did to work
around it was to test to see if the application was running under WinXP and
if it was, to create an Outlook OLE object and use that directly.

Note1: The user had to put in a sender address.

Note2: The application was custom for the business and at this point in
time, Outlook 2003 is only on XP machines (mind you, not all WinXP machines
have Outlook 2003). I know that in the real world, this might not be the
case...

Cheers,
Nick

Matthew Jones

unread,
Jan 31, 2005, 6:23:00 AM1/31/05
to
Most people's mail servers should work for their own outgoing email as
they are set up to relay for their IP range. For external senders,
authorization is usually required.

/Matthew Jones/

Robert Parrish

unread,
Feb 3, 2005, 11:00:09 AM2/3/05
to
Thanks everyone for your input. For now I will stick with SMTP.
Bob
"Matthew Jones" <mat...@matthewdelme-jones.delme.com> wrote in message
news:memo.2005013...@nothanks.nothanks.co.uk...
0 new messages