473,396 Members | 1,987 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,396 software developers and data experts.

Anyone have success with CDOEX and C#?

I know this is slightly off topic here - but while I can find some old VB
code examples, there is very little information on programming against this
library with C#.

Specifically , I want to send messages via MAPI to my Exchange 2000 server.

Any help or direction would be greatly appreciated.
Nov 15 '05 #1
7 5192

Hi Daniel,

If you already know how to use MAPI to interact with exchange 2000 server,
the articles below tells you how to use MAPI in C#:
http://www.codeproject.com/csharp/si...sp?target=mapi
http://www.codeproject.com/csharp/re...sp?target=mapi

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #2

Hi Daniel,

Acutally, I think you should interop with the MAPI component to use MAPI in
C#.
You can use "Add Reference" to introduce "Microsoft MAPI Controls 6.0" into
your project

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #3
The problem is MSDN says I can or should do a lot of things but doesn't tell
you HOW. There's examples for sending with SMTP and reading a mailbox
folder via CDO, but that's about it.
""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:3p**************@cpmsftngxa07.phx.gbl...

Hi Daniel,

Acutally, I think you should interop with the MAPI component to use MAPI in C#.
You can use "Add Reference" to introduce "Microsoft MAPI Controls 6.0" into your project

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #4
Daniel,
The following site lists a plethora of articles on using Outlook with .NET.
It has articles for both VB.NET & C# include both CDO 1.21 & CDOEX.

http://www.microeye.com/resources/res_outlookvsnet.htm

Hope this helps
Jay

"Daniel Billingsley" <db**********@NO.durcon.SPAAMM.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I know this is slightly off topic here - but while I can find some old VB
code examples, there is very little information on programming against this library with C#.

Specifically , I want to send messages via MAPI to my Exchange 2000 server.
Any help or direction would be greatly appreciated.

Nov 15 '05 #5

Hi Daniel,

Thanks for your feedback.
MSDN provides you most of the general .Net class library descriptions and
provides your many samples. But there are many fields that were previously
fulfilled with COM, while these fields are not included in .Net class
library, so .Net provides you a way of interop with COM to reuse the COM's
function.
Because MSDN is updating month by month, many microsoft COM components
documents were discarded, while many new .Net document were added in.
The Knowledge Base is a suitable supplement for samples and "How to"s. You
can find the KBs on http://support.microsoft.com.
I think the link in Jay's post provides you a general description of
articles in KB.

If you still feel this un-comfortable, you can suggest Microsoft at:
http://register.microsoft.com/mswish/suggestion.asp
or Email to ms****@microsoft.com

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #6
Using MAPI to talk to an Exchange server isn't quite the same thing as using
Outlook. If only things were so easy! :) Turning off Outlook's security
features is not that great a solution from a security standpoint, but it's
the one I've chosen as it's the only one I can get to work after 3 days of
fiddling around.

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Daniel,
The following site lists a plethora of articles on using Outlook with ..NET. It has articles for both VB.NET & C# include both CDO 1.21 & CDOEX.

http://www.microeye.com/resources/res_outlookvsnet.htm

Hope this helps
Jay

"Daniel Billingsley" <db**********@NO.durcon.SPAAMM.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I know this is slightly off topic here - but while I can find some old VB code examples, there is very little information on programming against

this
library with C#.

Specifically , I want to send messages via MAPI to my Exchange 2000

server.

Any help or direction would be greatly appreciated.


Nov 15 '05 #7
Daniel,
Using MAPI to talk to an Exchange server isn't quite the same thing as using Outlook. If only things were so easy! :) You really don't need to remind me of that ;-)

First: By MAPI do you mean Extended MAPI, CDO 1.2.1, CDOEX, OOM (Outlook
Object Model) or something else? I initially took it you meant CDOEX as that
is what you put in the subject. The page I gave is a comprehensive list that
includes samples for CDO 1.2.1, CDOEX, and OOM from both C# & VB.NET! It is
the only such list that I am aware of.
Don't forget there are multiple varieties of CDO:
- CDO 1.2.1 - which is the client side library that you can use to
supplements and/or replaces the OOM model. This is also a server side
library that is used for Exchange Event Scripts & Outlook Web Access.
- CDO for Exchange 2000 Server (CDOEX) which supplements CDO 1.2.1
- CDO for Exchange Management (CDOEXM) which supplements CDOEX
- CDO for NTS - Which is exposed via System.Web.Mail namespace

Remember that CDOEX is generally only server side and you will need to use
regular interop with it.

Remember that CDO 1.2.1 (MAPI.Session in VB) is installed with either
Exchange Server itself or with the Outlook Client. The library installed
with the Outlook client is subject to the same security prompts as the OOM.

For the most part if you have a VB example of using the library you want you
can simply cut & paste it into VB.NET, as VB.NET fully supports late
binding, however if you use it in C#, then you will need to manually do any
late binding (via reflection) that VB.NET & VB would have done for you.

If you meant Extended MAPI (IMAPISession in C++), I only know of one
Extended MAPI example for .NET, and I have not decided to release that or
not! As its is extreme pain for little gain, and it is no where near a
complete example.

I didn't think you meant Extended MAPI as Extended MAPI is not usable from
VB, without extreme pain & many C++ helper functions (which is effectively
CDO 1.2.1). I believe it would be usable from C# or VB.NET, however you
would need many helper functions based on various functions in the
System.Runtime.InteropServices namespace, however I question the real
usefulness of creating such a library. Using unsafe code from C# may reduce
the number System.Runtime.InteropServices routines, however I'm not sure
that's an advisable route ;-)

Hope this helps
Jay

"Daniel Billingsley" <db**********@NO.durcon.SPAAMM.com> wrote in message
news:O1**************@TK2MSFTNGP10.phx.gbl... Using MAPI to talk to an Exchange server isn't quite the same thing as using Outlook. If only things were so easy! :) Turning off Outlook's security
features is not that great a solution from a security standpoint, but it's
the one I've chosen as it's the only one I can get to work after 3 days of
fiddling around.

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Daniel,
The following site lists a plethora of articles on using Outlook with

.NET.
It has articles for both VB.NET & C# include both CDO 1.21 & CDOEX.

http://www.microeye.com/resources/res_outlookvsnet.htm

Hope this helps
Jay

"Daniel Billingsley" <db**********@NO.durcon.SPAAMM.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I know this is slightly off topic here - but while I can find some old

VB code examples, there is very little information on programming against

this
library with C#.

Specifically , I want to send messages via MAPI to my Exchange 2000

server.

Any help or direction would be greatly appreciated.



Nov 15 '05 #8

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

Similar topics

10
by: Google Mike | last post by:
{NOTE: I have PHP 4.2.2 for RH9 Linux.} Anyone have a better file_exists() out there? Even if you use shell out tricks with Linux using the `command` trick, I'd be interested to see what you...
0
by: martin | last post by:
How do you get the CDOEX for exchange library to work /install on my development machine? I want to develop a application to run on the exchange server which will use this CDOEX but it says it...
0
by: Tamir Kamara | last post by:
Hi, I'm trying to send an email using the cdoex (in asp.net) but no matter what address i put in the from (=sender) the server replys "sender's mailbox not found". Does someone knows why this...
0
by: Paul King | last post by:
Hey everyone, I'd like to ask your advice, or at least the advice of all of you who are either interested in, or already involved in, creating income from the internet. I'm not exactly...
6
by: A.M-SG | last post by:
Hi, We are developing a SmartClient application and we are planning to expose business objects layer to SmartClient application by using ASP.NET SOAP web services.
0
by: matt | last post by:
hello, i am curious if anyone has had success w/ a new workflow my group is discussion. the proposed flow: - our users, when online w/i our firewall, will request the intranet webapp to...
3
by: Robert Dufour | last post by:
I've got code doing that that should work and I've tested doing that with a program called smtp diagnostics. In both cases if I use my outside e-mail provider account with login username and...
2
by: Sean Peterson | last post by:
Has anyone had success using NetUseAdd() on shares that were replica links on a Windows 2003 DFS root? In my code, I'm getting error: pywintypes.error: (67, 'NetUseAdd', 'The network name cannot...
6
by: ayush patel | last post by:
Hi everybody, I wrote a windows service and I have to do sme email functionality in it. I used SMTP and added system.web reference to the project. there are no compilation errors as such but...
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: 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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.