How to get delivery reports on custom programmed email campaigns

About a year ago I decided to develop a bulk emailing program. My reasons at the time was mainly because I couldn’t justify the company I was a director of paying to send emails out on a bulk basis when I knew that I could simply do it myself if I wanted to. I mean if you really want to you could just send a bulk campaign from Microsoft Publisher.

I developed the proof of concept code using an instance of FCK Editor as the primary email creation tool and simply embedded all the image references and changes all the hyperlinks to point to a central website for measurement. There are obviously many other things I needed to do sill but I had the basics of a great bulk emailing solution in place.

Recently I was confronted with a friend that needs to send bulk emails out for a client but the client wants delivery reports on all the emails, so I obliged by whipping out the old code and making some adjustments. I using the C# programming language and Visual Studio 2008. The code however will be the same for other programming languages as all you need to do is append a a string to the header of the email to get delivery reports.

Below is the code needed to get email delivery reports on bulk email campaigns

MailMessage mail = new MailMessage();

mail.IsBodyHtml = true;
mail.Headers.Add(”X-Confirm-Reading-To”, “email-address-to-send-confirmations-to”);
mail.Headers.Add(”Disposition-Notification-To”, “email-address-to-send-confirmations-to”);

Thats it, its that simple, so for every email you send to a client, simply append this string to the header and the client will be prompted to send a delivery report.

I’d be glad to help anyone that needs more information on the topic of sending custom programmed bulk email campaigns.

You can leave a response, or trackback from your own site.

Leave a Reply