473,566 Members | 3,273 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5203

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.mi crosoft.com> wrote in message
news:3p******** ******@cpmsftng xa07.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**********@N O.durcon.SPAAMM .com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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****@microsof t.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******** ********@TK2MSF TNGP12.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**********@N O.durcon.SPAAMM .com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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**********@N O.durcon.SPAAMM .com> wrote in message
news:O1******** ******@TK2MSFTN GP10.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******** ********@TK2MSF TNGP12.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**********@N O.durcon.SPAAMM .com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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
3978
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 came up with. I have this remotely mounted SMB shares on Linux, stuck in my /mnt directory, and the docs tell me that file_exists() doesn't work on...
0
302
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 comes only with exchange, which you cant install on a XP machine? any ideas?
0
1002
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 happens and have a solution?
0
1029
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 experienced in on-line money making, in fact all I've managed so far is money losing! I don't suppose anyone gets it completely right first time so I'm sure...
6
2112
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
820
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 produce a PDF. this PDF is a form (and probably dynamic based on user)
3
2267
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 password it works OK. But if I try to send it via localhost my code excutes OK but the message gets stuck in the queue folder and just stays there. ...
2
3479
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 be found.') This is my scenario: Win2003 Server hosting DFS root #NTS-03 \\NTS-03.central.purdue.lcl\MI
6
6508
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 there is a run time error saying System.Web.HttpException: Could not create an object of type 'CDO.Message'. Please verify that the current platform...
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7893
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. ...
0
8109
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...
0
7953
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5485
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...
0
5213
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...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2085
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
926
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...

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.