rik.org rik.org Developing software and games



Home

Who Are You?

Cipher Work Log

Books

Email Rik

Archive

 

Send Email Tool

By Rik Heywood
7 January, 2002

Over the New Year I have been developing a tool to automate my daily build process. One of the features I wanted in this tool was the ability to send out e-mail messages. For example, when the build completes successfully, it would be great if all the developers got sent a message telling them all was well, and the QA people got a message telling them there is a new version that needs testing. It is also just as important to get messages when things go wrong, to help track down the error and fix it.

I did a bit of a Google search for command line tools for sending out e-mail messages, but I only found a couple, and they missed important features I needed. However, I did find some great sample code from PJ Naughter over at www.codeproject.com that provided me with all the pieces I needed to make my own tool. The Code Project is well worth a look by the way, as there is a ton of great samples with source code covering almost every corner of writing applications for Windows.

CloudsSendEmail is a simple command line tool that is able to send e-mail via SMTP or MAPI. This means it can send regular Internet e-mail as well as more corporate bound MS Exchange style e-mail. It supports all the features you would expect such as...

  • Setting the to, cc and bcc fields
  • Setting the message subject
  • Setting the message body from either the command line or from a file on disk.
  • Attaching files to the message
  • Handles MAPI not being installed on the local machine.
  • Ability to specify server address and port for SMTP messages
  • Ability to specify profile and password for MAPI messages.

My daily build tool now has a handy command line e-mailer to send people messages when the build process completes. I will probably release Daily Build when it is ready as well.

Download SendEmail