I came across the a fantastic tool for sending emails from the command line written by Brandon Zehm called SendEmail this works for various operating systems but the one I was interested in was Windows. I wanted to be able to schedule and configure this email to automate some email tasks. In doing I wrote a ‘wrapper’ that creates the command for running SendEmail while making it easier to configure. The parameters I have focused on are:
TO Email Address
CC Email Address
FROM Email Address
SMTP Server (without authentication, this is primarily for local/internal use)
Email Message (pulling in a .txt file that can contain HTML code)
Attachment File Name
The parameters are provided by a .ini file making it relatively easy for anyone to update the details above.