FileWatcher .vbs Script to send email

Discuss our other products here. Get help with installation and running, notify us of bugs, request new features and enhancements.

Moderators: DataMystic Support, Moderators

User avatar
DataMystic Support
Site Admin
Posts: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

FileWatcher .vbs Script to send email

Postby DataMystic Support » Mon May 10, 2010 1:46 pm

Here is a sample vbscript to sent an email - save it as 'send-email.vbs' and set FileWatcher's command field to point to this file.

See also:
http://www.ericphelps.com/scripting/samples/
http://support.microsoft.com/kb/171440

Code: Select all

Option Explicit

dim objArgs

'Set a reference to the arguments
Set objArgs = Wscript.Arguments

dim objEmail
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "me@mydomain.com"
objEmail.To = "you@yourdomain.com"
objEmail.Subject = "FileWatcher file attached"
objEmail.Textbody = "Please process it ASAP"

for i = 1 to objArgs.count
  objEmail.AddAttachment( objArgs(i) )
next

objEmail.Send

set objEmail = Nothing
Set objArgs = Nothing
Attachments
send_email.zip
(478 Bytes) Downloaded 456 times
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

Return to “FileWatcher, DirDate and other Support”

Who is online

Users browsing this forum: No registered users and 1 guest