CDOSYS Mailer

CDOSYS is a Windows component which is used to send email by SMTP – similar to its .NET successor System.Net.Mail.  Both of these APIs have their own strengths. Some developers don’t want to use CDOSYS since they want to stick with an all .NET solution.  However, CDOSYS is pretty seasoned is very capable and is…

0

HowTo: Create a mailbox for an existing user, Create a user in AD, List AD User info.

//====================================================================================================== // CdoexmMailboxUtil – //    Exchange Mailbox and user account creation sample. // // This sample demonstrates the following: //          Creating a user account in AD //          Mail Enable an existing user. //          List information on an existing user. // Note: This code is provided as a sample only, so you need to test and…

2

Broken Exchange Schema – WebDAV allprops, sinks and/or exoledb fail to return properties

Not getting all the properties you would expect from an WebDAV ALLPROPS or from an Event sink?  Well, it could be that the Exchange schema is broken.     The Problem: If you find that your application is no longer retrieving a full list of properties, it may be due to a broken Exchange Web Store…

2

HOWTO: Set and Get the a multibyte (Japanese, Chinese, Etc) custom header with CDOSYS

Custom headers in multibyte languages (Japanese, Chinese, etc) will not be encoded properly when set using CDO alone. They may appear to be correctly set, however when read back on a recieved message they may be messed-up. Here is an example of a Japanese header: I had a case where a customer wanted to read…

1

My .EDB file grows when I search.

When doing a WebDAV or any other search, you will likely see the .EDB file expands. When performing a search against a mailbox using WebDAV or any other API, you may see the .EDB file grow in size.  Don’t panic, this is normal.  When a search is performed, Exchange will put the results into a…

5

Howto: Add a body part to a message using CDOSYS.

The sample below shows how to add an additional body part to a message using cdosys.  This example demonstrates adding a “text/calendar” (vcalendar) body part, however it should be possible to use this to add “text/plain”, “text/html” and other types.  In the sample, “this.VCalendarText” holds the text to be written to the body part (in…

0

Example of setting headers with CDOSYS

  //============================ Optional Settings ======================== if (this.Priority.Length != 0){    // Well… it seems that priority is not what needs to be set to get priority set…    // Looks like setting importance will set priority… at least for cdosys… hmmm    if (this.Priority == “Non Urgent”)    {        oMsg.Fields[“urn:schemas:mailheader:importance”].Value = “Low”;        //oMsg.Fields[“urn:schemas:mailheader:priority”].Value = “Nonurgent”; // -1    };  //…

1

Call Dispose on client when calling COM+ objects.

Dispose MUST be called from the client and not from the serviced component…   There is a requirement for clients of COM+ Serviced Components to call dispose on the component.  If you do not do this, it will not shut down.  When you inherit from servicedcomponent, you also inherit from IDisposable.  However, the client MUST…

1

Howto: CDOSYS/C# Sending an ICS file

Todo:1) Open an appointment in Outlook.    Save to file as an .ICS file.2) Create a C# project and add the code below.3) Do the TODO sections. ‘TODO: Add a refernce to CDOSYS using System.IO;private void btnSendUsingIcs_Click(object sender, System.EventArgs e){ string sFrom = “me@mycompany.com”;      //  TODO: Change string sTo = “me@mycompany.com”;  //  TODO: Change string sSubject = “This is…

1