This project is read-only.


Project Description
A command line email utility using the .NET Framework.


CmdEmail -f -t -s Subject -b Body


CmdEmail -f "" -t "" -s "Subject" -b "Body"


CmdEmail -f -t, -s Subject -b Body

All command switches:

          t, to         Required. Recipient (To)
          f, from       Required. Sender (From)
          b, body       Required. Email Body (string or full path to file name)
          a, attach     File Attachment(s) - multiple attachments separated by comma)
          s, subject    Required. Email Subject
          h, host       SMTP Server - Optional only if provided in app config
          p, port       SMTP Port - Optional, can also be provided in app config
          u, username   Username - Optional, can also be provided in app config
          p, password   Password - Optional, can also be provided in app config
          l, logging    Logging - Optional, can also be provided in app config

You can provide the SMTP server, port, username and password in the application configuration file rather than via command switches. Of those, the SMTP server is the only required parameter. If the port isn't provided, the default port of 25 will be used. The username and password values will only be provided if both values are present.

Logging, if enabled, lots to the Windows Application Event Log.

Email body will pull from a file if the file name is provided and the file exists on disk. If the file does not exist it will use a string value.

Multiple file attachments are supported if file names are separated by a comma.


  • .NET 3.5 Framework

My Blog

My blog can be found at where I post news and updates about CMD Email.

My Twitter

My twitter account can be found at @donaldkitchen

Last edited May 2, 2012 at 10:05 PM by donkitchen, version 6