473,239 Members | 1,782 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,239 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 2351
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Siegfried Heintze | last post by:
Does the Outlook API supersede MAPI? If I implement a SPAM filter using MAPI to automatically delete messages from the message store, will other clients like Eudora benefit? If I implement a...
4
by: Kurt | last post by:
Hi I am using CDO 1.21 from C# in order to iterate through the entries in a users outlook address book (as OOM was too slow). Basically I take the Name field from each "message" and insert it into...
0
by: Selden McCabe | last post by:
I have a VB6 application running on a number of computers at a school. These all have Microsoft Office (and also Outlook) installed. They are using an Exchange server. This app uses the...
5
by: eadams | last post by:
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...
8
by: Philip Wagenaar | last post by:
I need Interop.MAPI.dll for a project, but where can I find this file?
8
by: MR | last post by:
Is there a document or example that show how to write a MAPI server/provider? Is there was way to write it in .NET? this will be for an application that runs on XP but needs to exposes a third...
3
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and...
4
by: Brian Hampson | last post by:
I recently upgraded to Outlook 2007 B2TR and have found that I can no longer code against MAPI.DLL It's gone :( Using C#, I used to get the MAPI session, and from that I could change the out of...
1
by: ngrTerry | last post by:
I am trying to find some references on how to use VBNET2005 to connect to an EXCHANGE2003 server to be able to produce a program which reports the number of unread emails in the INBOX for a...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.