Send E-Mail with CDO.Message


Some my feel that apart from it being a nifty trick, there isn’t any real practical use for sending E-Mail from a script but lets imagine the following scenario:

You have a business critical server called “ImpServ01” that must be available at all costs. The following script can be setup to run every five minutes to check the availability of the server and email you if the server becomes unavailable. This example uses a SMTP server called “” and sends mail from “” to “”.

To attach a file to the E-Mail add the following line:


Leave a Reply