471,349 Members | 1,217 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

MAPI and .Net - Microsoft says both supported and not?

I've been tasked with writing an application in VB.Net that will
manipulate messages in a user's Inbox. My Exchange admin prefers that
I use MAPI; I don't really care, but I want this to be as easy as
possible. The application will ultimately be installed on a machine
that will NOT have Outlook installed. But as I've been looking into
how to do this, I'm finding conflicting information.

First, there is this article from Microsoft web site:

http://support.microsoft.com/default...b;en-us;813349

Which states pretty clearly that "CDO 1.2x and MAPI are not supported
in a .NET Framework environment". That page recommends WebDAV be used
instead. But then there's this page:

http://msdn.microsoft.com/library/de...el_tech_13.asp

Which opines "Using MAPI is supported under the COM Interoperability
layer of Visual Studio .NET and the .NET Framework".
From other research I've done, it looks like you can do MAPI with .Net

via the MSMapi32.ocx that shipped with VB 6, but it is tricky. It is
especially problematic when run as a Windows service, which my program
probably will be.

Can someone shed some light on this? I don't want to waste a lot of
time writing to MAPI if it isn't going to work, but I also have to keep
my Exchange admin placated.

Erik
ea****@sheppardmullin.com

Jul 22 '05 #1
5 2180
Erik,
The way I interpret it is:

CDO & MAPI specifically are not supported under .NET, if you have a problem
specific to CDO or MAPI & you are using .NET you will not receive any
support from Microsoft (of course if you can replicate the problem in VB or
C++ then they may support you).

COM Interop is specifically supported under .NET. If you have a COM interop
problem that can be replicated with COM objects other then CDO or MAPI,
Microsoft will help you.
FWIW: I have a project that uses CDO 1.2.1 from VB.NET & it doesn't have any
real problems (other then normal CDO quirks). The "biggest" problem is that
CDO 1.2.1 parameters & return values are all defined as Variant in the type
lib, so they are Object in .NET. This makes working with them with Option
Strict On in VB.NET or in C# to be very taxing, as you need to constantly
cast the return values to useful types...

Hope this helps
Jay
<ea****@sheppardmullin.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
| I've been tasked with writing an application in VB.Net that will
| manipulate messages in a user's Inbox. My Exchange admin prefers that
| I use MAPI; I don't really care, but I want this to be as easy as
| possible. The application will ultimately be installed on a machine
| that will NOT have Outlook installed. But as I've been looking into
| how to do this, I'm finding conflicting information.
|
| First, there is this article from Microsoft web site:
|
| http://support.microsoft.com/default...b;en-us;813349
|
| Which states pretty clearly that "CDO 1.2x and MAPI are not supported
| in a .NET Framework environment". That page recommends WebDAV be used
| instead. But then there's this page:
|
|
http://msdn.microsoft.com/library/de...el_tech_13.asp
|
| Which opines "Using MAPI is supported under the COM Interoperability
| layer of Visual Studio .NET and the .NET Framework".
|
| >From other research I've done, it looks like you can do MAPI with .Net
| via the MSMapi32.ocx that shipped with VB 6, but it is tricky. It is
| especially problematic when run as a Windows service, which my program
| probably will be.
|
| Can someone shed some light on this? I don't want to waste a lot of
| time writing to MAPI if it isn't going to work, but I also have to keep
| my Exchange admin placated.
|
| Erik
| ea****@sheppardmullin.com
|
Jul 22 '05 #2
ea****@sheppardmullin.com wrote in
news:11**********************@g43g2000cwa.googlegr oups.com:
I've been tasked with writing an application in VB.Net that will
manipulate messages in a user's Inbox. My Exchange admin prefers that
I use MAPI; I don't really care, but I want this to be as easy as
possible. The application will ultimately be installed on a machine
that will NOT have Outlook installed. But as I've been looking into
how to do this, I'm finding conflicting information.


MAPI will still require some client to be installed AFAIK.

If Outlook is installed, COM Interop is better. If it not, you should consider contacting Exchange
directly, or maybe using IMAP4.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Get your ASP.NET in gear with IntraWeb!
http://www.atozed.com/IntraWeb/
Jul 22 '05 #3
> This makes working with them with Option
Strict On in VB.NET or in C# to be very taxing,
as you need to constantly cast the return values to useful types...


Darn that strong typing :-)

This helps. Frankly, if it will work then I'm ok with it. I'm not
thrilled about doing something "unsupported", but I guess that's life
sometimes.

Jul 22 '05 #4
> If Outlook is installed, COM Interop is better. If it not, you
should consider contacting Exchange directly, or maybe using IMAP4.


I'm not sure what you mean by "contacting Exchange directly". I've
read my application could use IMAP4 (via sockets talking to the
Exchange server directly) or WebDAV (VB.Net has classes to make this
pretty easy).
But, as I said, my Exchange admin insists on MAPI. When I've suggested
that MY life would be easier using WebDAV or IMAP4, his eyes glazed
over and he said "You can do that with MAPI". Very Jonestown.

Jul 22 '05 #5
"Erik" <ea****@sheppardmullin.com> wrote in news:1121211525.292750.195480
@g47g2000cwa.googlegroups.com:
I'm not sure what you mean by "contacting Exchange directly". I've
read my application could use IMAP4 (via sockets talking to the
Exchange server directly) or WebDAV (VB.Net has classes to make this
pretty easy).
You might try to convince him... Indy has support for IMAP4, and its free:
http://www.indyproject.org/
But, as I said, my Exchange admin insists on MAPI. When I've suggested
that MY life would be easier using WebDAV or IMAP4, his eyes glazed
over and he said "You can do that with MAPI". Very Jonestown.


This wont solve your problem, but it might put a different perspective on it:
http://tinyurl.com/avfbp
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Make your ASP.NET applications run faster
http://www.atozed.com/IntraWeb/
Jul 22 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Siegfried Heintze | last post: by
reply views Thread by Selden McCabe | last post: by
8 posts views Thread by Philip Wagenaar | last post: by
8 posts views Thread by MR | last post: by
4 posts views Thread by Brian Hampson | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.