NAME

Mail::Header - manipulate mail RFC822 compliant headers

SYNOPSIS

use Mail::Header;

$head = new Mail::Header;
$head = new Mail::Header \*STDIN;
$head = new Mail::Header [<>], Modify => 0;

DESCRIPTION

This package provides a class object which can be used for reading, creating, manipulating and writing RFC822 compliant headers.

CONSTRUCTOR

new ( [ ARG ], [ OPTIONS ] )

ARG may be either a file descriptor (reference to a GLOB) or a reference to an array. If given the new object will be initialized with headers either from the array of read from the file descriptor.

OPTIONS is a list of options given in the form of key-value pairs, just like a hash table. Valid options are

Reformat

If this value is true then the headers will be re-formatted, otherwise the format of the header lines will remain unchanged.

MailFrom

This option specifies what to do when a header in the form `From ' is encountered. Valid values are IGNORE - ignore and discard the header, ERROR - invoke an error (call die), COERCE - rename them as Mail-From and KEEP - keep them.

FoldLength

The default length of line to be used when folding header lines

METHODS

modify ( [ VALUE ] )
mail_from ( OPTION )
fold ( [ LENGTH ] )
extract ( ARRAY_REF )
read ( FD )
empty ()
header ( [ ARRAY_REF ] )
add ( TAG, LINE [, INDEX ] )
replace ( TAG, LINE [, INDEX ] )
combine ( TAG [, WITH ] )
get ( TAG [, INDEX ] )
exists ( TAG )
delete ( TAG [, INDEX ] )
fold_length ( [ LENGTH ] )
tags ()
dup ()
cleanup ()

AUTHOR

Graham Barr <Graham.Barr@tiuk.ti.com>

COPYRIGHT

Copyright (c) 1996 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REVISION

$Revision: 1.1 $ $Date: 1996/08/13 09:26:15 $

The VERSION is derived from the revision turning each number after the first dot into a 2 digit number so

Revision 1.8   => VERSION 1.08
Revision 1.2.3 => VERSION 1.0203