Nov 3, 2007

Send Email from Command line!

I am on-call this weekend, so that means I am tied down to the company support phone. It also means I have to monitor alerts and ensure certain processes are working correctly. One of the things on my list of weekend duties is to make sure that our financial dataload process runs at 12:00PM, and that I email the financial team when it is finished (just in case anyone is working some overtime from home).

I don't know about you, but I have things to do on the weekend. For instance, my daughter's little friend had her 3rd birthday today, and I couldn't look my little girl in the eyes and say, "Sorry baby girl, you can't go because daddy needs to shoot an email off to the finance team at noon. Maybe next time." No, I had to come up with a better solution.

Do you know what I did? I used a tip from my buddy Karl, and configured a rule in Outlook to run a script when I received a certain alert. You see, every day after the dataload process, we get an email of the results. I configured the rule to start my script when that alert came in. What did that script do? Why it sent a pre-configured email to all of the financial team of course!

I wrote a simple batch file using a pearl-based command line emailer called sendEmail by Caspian. What a life saver! It even comes in versions for both Windows and Linux!



As soon as the alert hit my inbox, my batch script went into action and shot out my pre-configured email like clockwork!

Bottom Line: Scripts = GOOD!


Click Here fo Cool bauer-Power Gear!



Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam