How do I send email alerts


Simon Brookman

In Performance Monitor I have set up an Alert for low disk
space and this sends me a message fine. As I am not
always going to be at my computer I would like to email a
group of people as well. I have written a Mail.js which
works fine if I run it manually. The problem is I can run
it if I list this program in the action tab and check run
this program ?? Can this run .js or does it have to be
a .exe?

var theApp, theNameSpace, theMailItem
var recipient = "email address"

var subject = "Low Disk Space"
var msg = "Disk Space is below 1MB, Please delete some
sendmail ( recipient, subject, msg)

function sendmail (recipient, subject, msg)
var theApp = new ActiveXObject("Outlook.Application");
var theNameSpace = theApp.GetNameSpace
var theMailItem = theApp.CreateItem(0);
theMailItem.Recipients.Add (recipient);
theMailItem.Subject = (subject);
theMailItem.Body = (msg);

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question