NAME
VBTK::Actions::Email - A sub-class of VBTK::Actions for sending email notifications
SYNOPSIS
$t = new VBTK::Actions::Email (
Name => 'emailMe',
To => 'me@nowhere.com' );
DESCRIPTION
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 module to actually send the email.
METHODS
The following methods are supported
- $s = new VBTK::Actions (<parm1> => <val1>, <parm2> => <val2>, ...)
-
The allows parameters are:
- Name
-
See VBTK::Actions (required)
- To, Cc, Bcc
-
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',
- From
-
A string containing the 'From' address to use when constructing the notification email. (Defaults to use whatever was setup in the Mail::Sendmail package).
From => 'vbtk@mydomain.com',
- Subject
-
A string containing the subject line to use when contructing the notification email. (Defaults to 'VBServer_<hostname>')
Subject => 'VBTK Message from $HOST',
- MessagePrefix
-
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";
- Smtp
-
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 perl module.
Smtp => "mysmtphost",
- Timeout
-
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,
- SendUrl
-
See "item_SendUrl" in VBTK::Actions. (Defaults to '1').
- LimitToEvery
-
See "item_LimitToEvery" in VBTK::Actions. (Defaults to '2 min').
- SubActionList
- LogActionFlag
SUB-CLASSES
The following sub-classes were created to provide common defaults in the use of VBTK::Actions::Email objects.
- VBTK::Actions::Email::Page
-
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.
SEE ALSO
AUTHOR
Brent Henry, vbtoolkit@yahoo.com
COPYRIGHT
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.