473,406 Members | 2,369 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,406 software developers and data experts.

Using CDO from C#

Hi all,

I am trying to read information from the GAL using C#. I am able to return a
list of all the addresses and names, however, when I walk through each
address I cannot access the mailbox (I keep getting prompted for
authentication information). Given that the long-term goal here is that the
application run unattended as a service this is obviously not desirable...

My environment consists of the following:
CDO 1.21
Exchange 2003
Outlook 2003
VS .NET 2003

The application (which uses CDO by the way) first of all goes to the
Exchange server and builds up a string array of all the users in the GAL.
Having got these addresses it then attempts to login to each individual
mailbox and extract the email addresses in the Contacts folder individual
mailbox which it writes out to a text file.

If you're thinking that this all sounds a bit nefarious then I wouldn't
blame you but let me assure that it isn't. The generated text file is one of
the criteria that the incoming mail filter uses to decide whether a mail
message should be rejected or left through - simple as that.

I chose CDO for two reasons, one was that I wanted to provide some
independence from different Outlook versions and secondly I wanted to bypass
the annoying dialogs that have become a "feature" of Outlook in recent
versions. However I am experiencing some issues which I am hoping that
someone may be able to help me with...

1. The Outlook security dialog is still coming up! This was one of the
reasons behind not using Outlook day one and instead using CDO. The line
that causes the dialog to come up is:

aeAddressEntry = (MAPI.AddressEntry)aesAdressEntries.get_Item(i);

where:
aeAddressEntry is a MAPI.AddressEntry
aesAdressEntries is a MAPI.AddressEntries collection
i is merely a loop counter

2. I am being prompted for a login for each mailbox, despite the fact that
the ID that the process is running under has Admin privileges - why is this?
I try to type acceptable credentials into it but the dialog keeps coming up
again. WhenI eventually cancel it the error that comes back is
MAPI_E_FAILONEPROVIDER.

3. According to the MSKB (cannot remember the KB#) use of CDO through C# is
not supported - if this is indeed the case what am I better off using?

Any help and pointers welcome - much thanks!

ATB,
Derek

"It's all fun and games till someone loses an eye..."
Derek Noonan, Technical Director, ntech.ie
Nov 16 '05 #1
0 1203

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

Similar topics

5
by: Enos Meroka | last post by:
Hallo, I am a student doing my project in the university.. I have been trying to compile the program using HP -UX aCC compiler, however I keep on getting the following errors. ...
3
by: Mike L | last post by:
Should the command call "using" be before or after my namespace? **AFTER** namespace DataGridBrowser { using System; using System.Drawing; using System.Drawing.Drawing2D; using...
3
by: xzzy | last post by:
I was wondering why we have to have using System.Data using System.Configuration using etc.... why are they not all lumped into one 'using'? In other words, is there a best way to use...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
3
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
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...

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.