| VBTK documentation | view source | Contained in the VBTK distribution. |
VBTK::Actions::Email - A sub-class of VBTK::Actions for sending email notifications
$t = new VBTK::Actions::Email (
Name => 'emailMe',
To => 'me@nowhere.com' );
The VBTK::Actions::Email is a simple sub-class off the VBTK::Actions class. It is used to define an email notification action. It accepts many of the same paramters as VBTK::Actions, but will appropriately default most if not specified. It makes use of the Mail::Sendmail (Mail::Sendmail) module to actually send the email.
The following methods are supported
The allows parameters are:
See VBTK::Actions (required)
A string containing a list of email addresses to which a message should be sent when the action is triggered. You must specify either 'To', 'Cc', or 'Bcc' when calling the 'new' method for this package.
To => 'me@somewhere.com',
Cc => 'me2@somewhere.com',
Bcc => 'me3@somewhere.com',
A string containing the 'From' address to use when constructing the notification email. (Defaults to use whatever was setup in the Mail::Sendmail (Mail::Sendmail) package).
From => 'vbtk@mydomain.com',
A string containing the subject line to use when contructing the notification email. (Defaults to 'VBServer_<hostname>')
Subject => 'VBTK Message from $HOST',
A string containing a block of text to add to the front of each email sent. (Defaults to none).
MessagePrefix => "The following is a message from VBTK\n";
A string containing the hostname or IP address of the Smtp server to which the email messages should be sent. If no value is specified, it will make use of the default set in the Mail::Sendmail (Mail::Sendmail) perl module.
Smtp => "mysmtphost",
A numeric value which specifies the max number of seconds to wait when sending the email to the Smtp server. (Default to 20).
Timeout => 20,
See item_SendUrl in VBTK::Actions. (Defaults to '1').
See item_LimitToEvery in VBTK::Actions. (Defaults to '2 min').
The following sub-classes were created to provide common defaults in the use of VBTK::Actions::Email objects.
Sending an email to a pager as an action
Others are sure to follow. If you're interested in adding your own sub-class, just copy and modify some of the existing ones. Eventually, I'll get around to documenting this better.
Brent Henry, vbtoolkit@yahoo.com
Copyright (C) 1996-2002 Brent Henry
This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation available at: http://http://www.gnu.org/copyleft/gpl.html
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| VBTK documentation | view source | Contained in the VBTK distribution. |