Tuesday, February 5, 2008

Sending E-mail via VBScript using CDO

This is a template for sending e-mail via vbscript using CDO. You will need to replace the subject/to/from to your liking. I also showed how to place an attachment in the email. Just change the path to the file you want to attach. You will also need to replace "smtp.yourdomain.com" with a valid smtp server. Most companies have some kind of smtp server and there may even be some free ones...that are publicly accessible but I doubt it...as they would be huge targets for spam deliveries. My original use for this script was to distribute log files and it was called by another script if the log was parsed and errors were found.

No comments: