VBTK::Actions::Email - A sub-class of VBTK::Actions for sending email notifications


VBTK documentation  | view source Contained in the VBTK distribution.

Index


NAME

Top

VBTK::Actions::Email - A sub-class of VBTK::Actions for sending email notifications

SYNOPSIS

Top

  $t = new VBTK::Actions::Email (
    Name         => 'emailMe',
    To           => 'me@nowhere.com' );

DESCRIPTION

Top

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.

METHODS

Top

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 (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 (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

See item_SubActionList in VBTK::Actions.

LogActionFlag

See item_LogActionFlag in VBTK::Actions.

SUB-CLASSES

Top

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

Top

VBTK::Server
VBTK::Parser
VBTK::Actions
VBTK::Actions::Email::Page
Mail::Sendmail (Mail::Sendmail)

AUTHOR

Top

Brent Henry, vbtoolkit@yahoo.com

COPYRIGHT

Top


VBTK documentation  | view source Contained in the VBTK distribution.