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: System.Web.Mail (SWM)

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: All versions of .NET Framework (as of 3.5).   Summary: The System.Web.Mail namespace was the original email messaging class in the .NET Framework.  It is a simple wrapper around CDOSYS.  The functionality availabe…

0

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

Example of setting headers with System.Web.Mail

//============================ Optional Settings ======================== if (this.Priority.Length != 0){    if (this.Priority == “Non Urgent”) { oMsg.Priority = System.Web.Mail.MailPriority.Low; };    if (this.Priority == “Normal”) { oMsg.Priority = System.Web.Mail.MailPriority.Normal; };    if (this.Priority == “Urgent”) { oMsg.Priority = System.Web.Mail.MailPriority.High; }; } if (this.RequestReadReceipt == true){    oMsg.Fields[“urn:schemas:mailheader:disposition-notification-to”] =  this.From;} if (this.RequestDeliveryReceipt == true){    oMsg.Fields[“urn:schemas:mailheader:return-receipt-to”] = this.From;} if (this.ReplyTo.Length != 0){   …

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

Building VCALENDAR content without an Microsoft API is not supported by MS.

While Microsoft products follow many RFC guidelines for VCALENDAR/iCAL, it does not mean that they support development of VCALENDAR/iCAL directly.  Microsoft has APIs which can build and read such content.  Working with those APIs is supported; however working with VCALENDAR/iCAL text programmatically is not supported. This means if you build a message via code (not…

5