Building messaging applications with “Any CPU”

When building pure .NET applications doing builds using Any CPU usually go pretty smoothly. Even when mixing in some COM objects things usually go well. However, developers often run into issues with .NET code using COM objects then deploying their applications to other computers where the bitness of their development box OS does not match…

0

HowTo: Set a reference to CDOSYS

You could set a reference directly to the CDOSYS file. However, there this is a more elegant way overall and that is to do it in Visual Studio: Click on Solution Explorer. Right click the “References” node in the tree and select “Add Reference…”. Click on the COM tab. Navigate to the “Microsoft CDO for…

0

About: Encrypting or signing a message programmatically

We get cases on encrypting email from time to time.   With Microsoft messaging APIs, sending an encrypted or signed message is not just  matter of flipping flag or pointing to a certificate.  The easiest is going to be using Outlook Object Model (OOM);  however, because of its user tied usage it cannot be used in a…

0

About: SMTP Sending APIs

Summary: Microsoft has several APIs which send email by SMTP.  These ‘SMTP Senders’ are meant to send email to SMTP servers and do not have access to a mailboxes or public folders. Mail submitted by SMTP will not be saved into the Sent Items of the sender’s mailbox.  The beauty of these APIs is that…

0

About: System.Net.Mail (SNM)

API Type: SMTP Sender API Interface: .NET Framework Namespace Classes. Business Logic: Sending mail via SMTP. Language Support: .NET Languages only. Direct Property Access: N/A. Product Versions: .NET Framework 2.0 and later (as of .NET 3.5).   Summary: SNM is a pure .NET namespace for sending mail via SMTP.  System.Net.Mail replaces System.Web.Mail, which was a partial .NET wrapper for…

0

About: CDO for Windows 2000 (CDOSYS)

API Type: SMTP Sender. API Interface: COM Library. Business Logic: Sending mail via SMTP Language Support: Works with both managed (.NET) and unmanaged code and scripting languages such as VBScript. Direct Property Access: N/A. Product Versions: Windows 2000 and later. Summary: CDOSYS has been a system component used to send email since Windows 2000.  It was meant to replace CDONTS. …

1

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

Enumerating fields for CDOSYS, System.Web.Mail and System.Net.Mail

There are times when you may want to enumerate the fields set on a message while debugging issues with CDOSYS, System.Web.Mail, or System.Net.Mail.  Below is sample code which will enumerate these fields.  As you can see, there are some considerable differenences between how enumeration is done.   CDOSYS:——-     int iCount = 0;     for…

1

Adding Inline Attachments with CDOSYS and System.Net.Mail.

In the following samples, I’m going to send an inline attachment using CDOSYS and System.Net.Mail (SNM). Lets say you have an html document with text above and below a jpg file and you want this document inside of a message you are going to send.  Below is the the basic HTML document.   Notice that img…

0

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