Technical information

INSTALLATION AND ADMINISTRATION GUIDE
122
EOF
$VSIFAX/lbin/vmail <email address>
Example for Windows platforms
The script below runs on Windows platforms only (not on Unix and Linux platforms).
This sample is called when modifying a user profile setting. It logs the modification in %VSI-
FAX%/spool/logs/usrschg and sends a notification email to an administrator.
#--------------------------------------------------------
# sys-usrchg.tcl
# VSI-FAX user change notification for Windows
#--------------------------------------------------------
#--------------------------------------------------------
# Get all arguments and setup environment
#--------------------------------------------------------
global argv env
set CLIENTID [lindex $argv 0]
set CHANGE [lindex $argv 1]
set VSIFAX $env(VSIFAX)
set TIMESTAMP [ clock format [ clock seconds ] -format {%Y/%m/%d %H:%M:%S} ]
set ERROR "VSI-FAX user database change: $CHANGE $CLIENTID"
set EMAIL email@address.com
#-------------------------------------------------------
# Update log file
#-------------------------------------------------------
set f [ open $VSIFAX\\spool\\logs\\usrchg a+ ]
puts $f "$TIMESTAMP $ERROR"
close $f
#-------------------------------------------------------
# Create email file
#-------------------------------------------------------
set g [ open $VSIFAX\\spool\\temp\\usrchg w+ ]
puts $g "$TIMESTAMP $ERROR"
close $g
#-------------------------------------------------------
# Email notification to specified mail address
#-------------------------------------------------------
exec "$VSIFAX\\lbin\\vmime" -t -s $ERROR "$VSIFAX\\spool\\temp\\usrchg" | \
"$VSIFAX\\lbin\\vmail" -R $EMAIL $EMAIL
file delete "$VSIFAX\\spool\\temp\\usrchg"
exit 0
Customizing notification email messages
You can easily customize email messages sent at various points in the notification mechanism using template files.
See also
For more information, refer to Template files
.
Simply create a template file, place it in $VSIFAX/lib/templates directory, then associate it with one of the
following notification points in a user profile or by directly setting the appropriate tag in the user database.
The following table shows which notification messages can be customized and which user tags must be set to
accomplish that.