473,383 Members | 1,716 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,383 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 2357
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.