Skip to main content

Posts

Showing posts from May, 2005

Displaying a collapsible conversation view of messages within in a folder using ASP.Net

I’ve been playing around with displaying message conversations in a group by format similar to what you can do with Outlook customized views. The ASP.net and ADO.net stuff is certainly a lot more accommodating when you are trying to do this vs ADO and ASP classic. Although they still have a little way to go with displaying hierarchal data. (that said the asp.net 2.0 looks like it’s a great leap forward). For my code though I only had ASP.net 1.1 so I had to make do with what there is. As a base for this code I used the stuff I posted here and added in some other fields to retrieve to allow me to start to group by conversation. The main fields I’ve used to do the group by are the PR_Conversation_topic x0070001E and PR_Subject_prefix x003D001E. Basically I used the prefix fields to work out if a mail in the queryied folder was the first mail in a conversation (eg any response will have a prefix the first message won’t). And the PR_Conversation_topic was used to relate the emails togethe

Script to Copy Public folder contacts to a mailbox's Contacts folder using CDO 1.2

Somebody asked today about this script I posted a while ago about copying contacts between mailbox's using the vCard method in CDOEX. While this script works okay for simple contacts if you have rich contacts where you have lots of additionally information that CDOEX doesn't include in the vcard stream then it can be a lot of work going through and copying each one of these Mapi properties manually (which I've already done for a few props in this script). The other option if you want to do this in a script is to use MAPI via CDO 1.2. The big advantage of using MAPI is that you will retain all the MAPI properties as they are on the object and also you can run the script remotely where the CDOEX script must be run locally on the Exchange server. The actually question was about copying contacts from a public folder to a mailbox so I've come up with a script that will do this using MAPI via CDO 1.2. To use this script you need to know the entryID for the public folder wher

C# Catchall Onarrival Event sink

One of the Event sinks that comes in handy from time to time especially if people own a lot of domains is the catch all event sink from http://support.microsoft.com/?kbid=324021 .Now the .NET frameworks a bit more prevalent and the fact I wanted to use this on my Internal servers for something I thought I’d give converting this sink to C# ago. There are two ways you can go about writing SMTP event sinks in managed code the first is to build some wrappers as outlined in on msdn . This gives you access to all the protocol and transport events. The second way to build a SMTP event sink in managed code is to use the CDO onarrival event whose interfaces are defined in the cdoex.dll file (or cdosys.dll if you don’t have Exchange). The downside of using the CDO interface is that it adds significant overhead and is synchronous but the upside is that it that it handles most of the parsing and MIME issues. There’s a good doc here that discusses the issues . But using C# is a step up from VBS

Changing the default permissions on a calendar to Reviewer

Updated 3/8/2005 to update local freebusy folder permissions to editor Changing the default permissions on user’s calendars to reviewer is something that comes up now and again in different companies for different reasons. Automating this with script is relatively straight forward if you use the ACL.dll which you can get a copy of from the sample on CDOLive http://www.cdolive.com/aclviewer.htm . Actually the day after I wrote the below script I found another utility that someone had created call setperm that gives you a nice GUI to this. As well as that it gives you the ability to change permissions on other folders other then the calendar. The original web site that hosted this utility seems to be gone now (which is a shame it because it had some good stuff) but you can still download the utility from http://www.slipstick.com/files/setperm.zip . There's also a third party application from Symprex that can do this go here for details. If your still interested in the script versio
All sample scripts and source code is provided by for illustrative purposes only. All examples are untested in different environments and therefore, I cannot guarantee or imply reliability, serviceability, or function of these programs.

All code contained herein is provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.