NAME
Mail::Spool::Node - Mail Spool inode encapsulization
SYNOPSIS
#!/usr/bin/perl -w
package MySpoolNode;
use Mail::Spool::Node;
@ISA = qw(Mail::Spool::Node);
# OR
sub new {
my $self = __PACKAGE__->SUPER::new(@_);
### do my own stuff here
return $self;
}
DESCRIPTION
Mail::Spool::Node is intended as an encapsulization of an inode for use by Mail::Spool::Handle. 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::Node 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 $from = $self->from;
$self->from($new_from);
The following properties are available:
- to
-
Returns the "To" email address of this node.
- from
-
Returns the "From" email address of this node.
- id
-
Returns the message id of this node.
- time
-
Returns the time this node was placed in the spool.
- msh
-
Returns the mail spool handle that this node is in.
- name
-
Returns the filename of this node in the mail spool handle directory.
METHODS
- new
-
Returns a Mail::Spool::Node object. Arguments in the form of a hash or hash ref are used to populate the object. Also calls load_node_properties.
- can_process
-
Returns whether the node is eligible for processing. This is based upon how long it has been in the mail spool handle.
- size
-
Returns the size of the node in bytes.
- lock_node
-
Locks the node to prevent any other process from trying to write to it. This is done via File::NFSLock. Returns the lock object.
- lock_error
-
Returns the error of File::NFSLock should something happen during the locking process.
- filehandle
-
Returns an IO::Handle style object opened to the filename of this node.
- filename
-
Returns the filename of this node.
- fallback_filename
-
Returns the place to put this file in case the node could not be sent right now. Returns undef if fallback cannot proceed (undeliverable).
- fallback
-
Actually perform the fallback operation.
- delete_node
-
Unlink the node from the directory.
SEE ALSO
Please see also Mail::Spool, Mail::Spool::Handle.
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.