NAME

Message::Header - Zero Knowledge Message Header Class


SYNOPSIS

    use Message::Header;

    $base = new Message::Header();


REQUIRES

    Perl5.004
    User::Base (Subclass)


EXPORTS

Nothing


DESCRIPTION

This is the message header class. This class encapsulates a single message header item within a mail or news message. This class contains an implementation of the perl library module Mail::Internet to assist with the manipulation of RFC822 compliant Internet mail headers.

The Message::Header is not a sub-class of any class.


CONSTRUCTOR

new Message::Header()

This is the constructor for the Message::Header object. A new header object is created with the new method and is accessed through the resulting object.


METHODS

from( [ USER ] )

Return the From field of the message header. If USER is supplied, then this object will bw set internally.

to( [ USER ] )

Return the To field of the message header. If USER is supplied, then this object will bw set internally. Multiple recipiets may be specified by passing an array of User::Base objects to this method.

cc( [ USER ] )

Return the CC field of the message header. If USER is supplied, then this object will bw set internally. Multiple recipiets may be specified by passing an array of User::Base objects to this method.

bcc( [ USER ] )

Return the BCC field of the message header. If USER is supplied, then this object will bw set internally. Multiple recipiets may be specified by passing an array of User::Base objects to this method.

reply_to( [ USER ] )

Return the Reply-To field of the message header. If USER is supplied, then this object will bw set internally.

return_path( [ USER ] )

Return the Return-Path field of the message header. If USER is supplied, then this object will bw set internally.

sender( [ USER ] )

Return the Sender field of the message header. If USER is supplied, then this object will bw set internally.

freedomize ()

Transform this message content object into a ZKS Freedom network compatible message.

tagdata ( [ TAG, DATA ] )

Return the data associated with the spcified tag. If TAG and DATA are supplied then this new tag will be added, otherwise DATA will replace the data item currently associated with TAG.

squish ( TAG )

Combine multiple instances of TAG into a single header line. The condensed items will be seperated by default seperator character, comma ','.

compress ()

Combine multiple instances of ALL tags in this header. The condensed items will be seperated by the default seperator character, comma ','.

clear ()

Empty the internal contents of the header. This method will delete all tag/data pairs in the header object.

parse ( TEXT )

Parse the supplied header data and store internally. The text buffer passed is asumed to be a list of strings representing eiter an entire message (header + body) or just RFC822 compliant header line.

as_list()

Return the raw message text as a list of strings. The returned text complies with RFC822 header constructs. The returned hash is a readonly copy of the header and any modification made to it will not affect the header object.

as_hash ()

Return the raw header items as a hash, where the individual RFC822 header lines asplit into key/data pairs. The returned hash is a readonly copy of the header and any modification made to it will not affect the header object.

print()

Print the raw message text as with as_list but output the resulting list of strings to the default output device (stdout).


CLASS VARIABLES

None Present


SEE ALSO

Message::Base, Mail::Internet


AUTHOR

Kris Smith <krissmi@zeroknowledge.com> Philippe McLean <phillipem@zeroknowledge.com>


COPYRIGHT

Copyright 2000 Zero Knowledge Systems, Inc. All rights reserved