A command line email utility using the .NET Framework.
CmdEmail -f firstname.lastname@example.org -t email@example.com -s Subject -b Body
CmdEmail -f "firstname.lastname@example.org" -t "email@example.com" -s "Subject" -b "Body"
CmdEmail -f firstname.lastname@example.org -t email@example.com,firstname.lastname@example.org -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.
My blog can be found at http://www.donkitchen.com where I post news and updates about CMD Email.
My twitter account can be found at @donaldkitchen