The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mail::Spool::Handle - Mail Spool directory encapsulization

SYNOPSIS

  #!/usr/bin/perl -w
  package MySpoolHandle;

  use Mail::Spool::Handle;
  @ISA = qw(Mail::Spool::Handle);

  # OR

  sub new {
    my $self = __PACKAGE__->SUPER::new(@_);

    ### do my own stuff here

    return $self;
  }

DESCRIPTION

Mail::Spool::Handle is intended as an encapsulization of a directory for use by Mail::Spool. It has been written with the intent of being able to use a database or other "file" system as a backend.

PROPERTIES

Properties of Mail::Spool::Handle are accessed methods of the same name. They may be set by calling the method and passing the new value as an argument. For example:

  my $spool_dir = $self->spool_dir;
  $self->spool_dir($new_spool_dir);

The following properties are available:

spool_dir

Path to the directory of this spool.

fallback_dir

Path to the directory of the fallback spool, used if a node could could not be delivered. If undef, it is assumed that that message is undeliverable.

wait

Number of seconds which a node must be present in the spool before it can be sent.

dh

An open directory handle to spool_dir.

spool

Return the spool that created this msh object.

METHODS

new

Returns a Mail::Spool::Handle object. Arguments in the form of a hash or hash ref are used to populate the object.

open_spool

Opens a directory handle on spool_dir and stores the result in dh.

next_node

Essentially does a readdir on the dh property. Returns a Mail::Spool::Node object. Once there are no more nodes, it returns undef.

mail_spool_node

Calls &Mail::Spool::mail_spool_node by default. Returns a Mail::Spool::Node.

SEE ALSO

Please see also Mail::Spool, Mail::Spool::Node.

COPYRIGHT

  Copyright (C) 2001, Paul T Seamons
                      paul@seamons.com
                      http://seamons.com/

  This package may be distributed under the terms of either the
  GNU General Public License
    or the
  Perl Artistic License

  All rights reserved.