473,594 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MAPI in .NET 2.0 without Outlook installed to work with Exchange 2003?

Hi, All:

I am tasked with the following. I need to write a service to monitor an
Exchange mailbox and take action when an email is received, put it in a db,
etc. I do not need to send emails through MAPI, only monitor a folder in
exchange.

Can I use .NET objects to do this or do I absolutely need a 3rd party add-in
such as Outlook Redemption. This has to go on an enterprise production
server, so the server group will fight me hard if I tell them that i need a
3rd party add-in with my service.

Here is the fun part. No outlook on the machine, so I cannot instantiate
Outlook application. And, since it is a service, not user based, no option
for security prompts. I am not sending email through MAPI, only reading the
mailbox with supplied credentials. Is this possible with config laid out
(no outlook / has to run as service / built in .NET objects only)? Any
links / tips to put me in the right direction?

Thanks in advance!
Jun 1 '06 #1
4 3508
Tarren,

What version of Exchange are you working with?

Honestly, I don't see why you would write this as a service, it would
just be a waste of resources (especially all the work trying to tie in the
service with exchange, and getting notifications).

I would check out the Exchange section on the MSDN site, particularly,
the SDK for the version of exchange you are running:

http://msdn.microsoft.com/exchange

If you want to filter email just from the outside world, then you can
create an SMTP event sink which will be called when an email is sent through
SMTP. If you want to monitor internal emails as well, then you need to
create a Store Event Sink, which will be activated whenever an item is
modified in the store (a user's inbox, for example).

It seems that all of these sinks require implementations of COM
interfaces, which is completely possible in .NET, but will take a little
work (and not require a service on your part).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Tarren" <no***********@ thankyou.com> wrote in message
news:ue******** ******@TK2MSFTN GP03.phx.gbl...
Hi, All:

I am tasked with the following. I need to write a service to monitor an
Exchange mailbox and take action when an email is received, put it in a
db, etc. I do not need to send emails through MAPI, only monitor a folder
in exchange.

Can I use .NET objects to do this or do I absolutely need a 3rd party
add-in such as Outlook Redemption. This has to go on an enterprise
production server, so the server group will fight me hard if I tell them
that i need a 3rd party add-in with my service.

Here is the fun part. No outlook on the machine, so I cannot instantiate
Outlook application. And, since it is a service, not user based, no
option for security prompts. I am not sending email through MAPI, only
reading the mailbox with supplied credentials. Is this possible with
config laid out (no outlook / has to run as service / built in .NET
objects only)? Any links / tips to put me in the right direction?

Thanks in advance!

Jun 1 '06 #2
Thank you. I will look into what options are out there.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:Om******** *****@TK2MSFTNG P05.phx.gbl...
Tarren,

What version of Exchange are you working with?

Honestly, I don't see why you would write this as a service, it would
just be a waste of resources (especially all the work trying to tie in the
service with exchange, and getting notifications).

I would check out the Exchange section on the MSDN site, particularly,
the SDK for the version of exchange you are running:

http://msdn.microsoft.com/exchange

If you want to filter email just from the outside world, then you can
create an SMTP event sink which will be called when an email is sent
through SMTP. If you want to monitor internal emails as well, then you
need to create a Store Event Sink, which will be activated whenever an
item is modified in the store (a user's inbox, for example).

It seems that all of these sinks require implementations of COM
interfaces, which is completely possible in .NET, but will take a little
work (and not require a service on your part).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Tarren" <no***********@ thankyou.com> wrote in message
news:ue******** ******@TK2MSFTN GP03.phx.gbl...
Hi, All:

I am tasked with the following. I need to write a service to monitor an
Exchange mailbox and take action when an email is received, put it in a
db, etc. I do not need to send emails through MAPI, only monitor a
folder in exchange.

Can I use .NET objects to do this or do I absolutely need a 3rd party
add-in such as Outlook Redemption. This has to go on an enterprise
production server, so the server group will fight me hard if I tell them
that i need a 3rd party add-in with my service.

Here is the fun part. No outlook on the machine, so I cannot instantiate
Outlook application. And, since it is a service, not user based, no
option for security prompts. I am not sending email through MAPI, only
reading the mailbox with supplied credentials. Is this possible with
config laid out (no outlook / has to run as service / built in .NET
objects only)? Any links / tips to put me in the right direction?

Thanks in advance!


Jun 1 '06 #3
Tarren wrote:
Hi, All:

I am tasked with the following. I need to write a service to monitor an
Exchange mailbox and take action when an email is received, put it in a db,
etc. I do not need to send emails through MAPI, only monitor a folder in
exchange.

Can I use .NET objects to do this or do I absolutely need a 3rd party add-in
such as Outlook Redemption. This has to go on an enterprise production
server, so the server group will fight me hard if I tell them that i need a
3rd party add-in with my service.

Here is the fun part. No outlook on the machine, so I cannot instantiate
Outlook application. And, since it is a service, not user based, no option
for security prompts. I am not sending email through MAPI, only reading the
mailbox with supplied credentials. Is this possible with config laid out
(no outlook / has to run as service / built in .NET objects only)? Any
links / tips to put me in the right direction?

Thanks in advance!


If you want to do it with .Net, you can just poll the folder with
WebDav. It is pretty simple. If you want me to email you an example
project off list, let me know.

Jim
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
You roll an 18 in Dex and see if you
don't end up with a girlfriend
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
JimD
Central FL, USA, Earth, Sol
Jun 2 '06 #4
Thanks, Jim. Ironically enough this, prior to seeing your response this was
the route I discovered by trial and error and exhaustive research. I was
able to do it 100% in .NET namespaces which makes it a lot easier, since I
did not have to use MSXML either. :)

"JimD" <Ji*******@gmai l.com> wrote in message
news:_c******** **********@torn ado.tampabay.rr .com...
Tarren wrote:
Hi, All:

I am tasked with the following. I need to write a service to monitor an
Exchange mailbox and take action when an email is received, put it in a
db,
etc. I do not need to send emails through MAPI, only monitor a folder in
exchange.

Can I use .NET objects to do this or do I absolutely need a 3rd party
add-in
such as Outlook Redemption. This has to go on an enterprise production
server, so the server group will fight me hard if I tell them that i need
a
3rd party add-in with my service.

Here is the fun part. No outlook on the machine, so I cannot instantiate
Outlook application. And, since it is a service, not user based, no
option
for security prompts. I am not sending email through MAPI, only reading
the
mailbox with supplied credentials. Is this possible with config laid out
(no outlook / has to run as service / built in .NET objects only)? Any
links / tips to put me in the right direction?

Thanks in advance!


If you want to do it with .Net, you can just poll the folder with
WebDav. It is pretty simple. If you want me to email you an example
project off list, let me know.

Jim
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
You roll an 18 in Dex and see if you
don't end up with a girlfriend
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
JimD
Central FL, USA, Earth, Sol

Jun 5 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9882
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 SPAM filter using Outlook to automatically delete messages from the message store, will other clients like Eudora benefit? Thanks, Siegfried
2
4703
by: Adam Kinney | last post by:
I have an ASP application that logs into Exchange server to send email. The code looks like this: Set objSession = CreateObject("MAPI.Session") objSession.Logon "profileName" strMsg = ".." Set objMessage = objSession.Outbox.Messages.Add objMessage.Subject = "Customer Comment" objMessage.Text = strMsg
4
7185
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 a ListBox. I shall paste my code at the end, and describe my problem first If I call my MAPI.Sessions Logoff method when I have finished using it, then this method takes between 1 and 5 minutes to execute, but after that everything is fine If...
5
2376
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 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...
0
3463
by: DC Fan | last post by:
I am wirting an application in Access 2002 (XP) that needs to send email. Since I hate the dialog boxes you get from all the Outlook warning messages, I am trying to use the MAPI object. On *SOME* PC's the code runs fine, but on others, the code can execute the logon portion of the code just fine, but when it tries to create a message, I get the following error codes: -2147221219, which when I look it up is MAPI_E_FAILONEPROVIDER. I can...
8
13977
by: Philip Wagenaar | last post by:
I need Interop.MAPI.dll for a project, but where can I find this file?
3
2828
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 additionally pictures of the product are stored in an images subfolder and the database holds the file name of the relevant picture. The user can then click a button to display the picture in a pop-up window and also another button to email the potential...
4
15056
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 office. No longer. Does anyone know how to do this using the new Microsoft.Office.Core and Microsoft.Office.Outlook DLL's that are supposed to be the new replacements? Here's what I had that worked until Outlook 2007 came around:
1
4387
by: Danny | last post by:
Hi Am trying to send emails via simple mapi. The application will be running on a machine which has outlook 2003 installed. My test app works but the file email is placed in the outbox within outlook, and does not get sent until a start outlook and process the waiting emails. Is there any way I can send the emails without the interaction of outlook? Am connecting to exchange 2003 btw, using dotnet 2.0
0
7946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8253
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8009
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6661
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5411
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1482
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1216
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.