NAME
Mail::Box::Dir::Message - one message in a directory-organized folder
CLASS INHERITANCE
Mail::Box::Dir::Message is a Mail::Box::Message is a Mail::Message is a Mail::Reporter
Mail::Box::Dir::Message is extended by Mail::Box::MH::Message Mail::Box::Maildir::Message
SYNOPSIS
my $folder = new Mail::Box::MH ...
my $message = $folder->message(10);
DESCRIPTION
A Mail::Box::Dir::Message is a base class for one message in a directory organized folder; each message is stored in a separate file. There are no objects of type Mail::Box::Dir::Message, only extensions are allowed to be created.
At the moment, two of these extended message types are implemented:
Mail::Box::MH::Message
which represents one message in a Mail::Box::MH folder.
Mail::Box::Maildir::Message
which represents one message in a Mail::Box::Maildir folder.
METHODS
Initiation
- new OPTIONS
-
Create a messages in a directory organized folder.
OPTION DEFAULT body undef body_type <from folder> deleted <false> field_type undef filename undef folder <required> head undef head_type 'Mail::Message::Head::Complete' log 'WARNINGS' messageId undef modified <false> size undef trace 'WARNINGS' trusted <false>
- body => OBJECT
-
See Mail::Message::new(body)
- body_type => CODE|CLASS
-
See Mail::Box::Message::new(body_type)
- deleted => BOOLEAN
-
See Mail::Box::Message::new(deleted)
- field_type => CLASS
-
See Mail::Message::new(field_type)
- filename => FILENAME
-
The file where the message is stored in.
- folder => FOLDER
-
See Mail::Box::Message::new(folder)
- head => OBJECT
-
See Mail::Message::new(head)
- head_type => CLASS
-
See Mail::Message::new(head_type)
- log => LEVEL
-
See Mail::Reporter::new(log)
- messageId => STRING
-
See Mail::Message::new(messageId)
- modified => BOOLEAN
-
See Mail::Message::new(modified)
- size => INTEGER
-
See Mail::Box::Message::new(size)
- trace => LEVEL
-
See Mail::Reporter::new(trace)
- trusted => BOOLEAN
-
See Mail::Message::new(trusted)
Constructing a Message
- bounce OPTIONS
-
See Mail::Message::Construct::bounce()
- build [MESSAGE|BODY], CONTENT
-
See Mail::Message::Construct::build()
- buildFromBody BODY, HEADERS
-
See Mail::Message::Construct::buildFromBody()
- coerce MESSAGE
-
See Mail::Box::Message::coerce()
- forward OPTIONS
-
See Mail::Message::Construct::forward()
- forwardPostlude
-
See Mail::Message::Construct::forwardPostlude()
- forwardPrelude
-
See Mail::Message::Construct::forwardPrelude()
- forwardSubject STRING
-
See Mail::Message::Construct::forwardSubject()
- read FILEHANDLE|SCALAR|REF-SCALAR|ARRAY-OF-LINES, OPTIONS
-
See Mail::Message::Construct::read()
-
See Mail::Message::Construct::reply()
- replyPrelude [STRING|FIELD|ADDRESS]
-
See Mail::Message::Construct::replyPrelude()
- replySubject STRING
-
See Mail::Message::Construct::replySubject()
The Message
- clone
-
See Mail::Message::clone()
- copyTo FOLDER
-
See Mail::Box::Message::copyTo()
- filename [FILENAME]
-
Returns the name of the file in which this message is actually stored. This will return
undef
when the message is not stored in a file. - folder [FOLDER]
-
See Mail::Box::Message::folder()
- isDummy
-
See Mail::Message::isDummy()
- isPart
-
See Mail::Message::isPart()
- messageId
-
See Mail::Message::messageId()
- modified [BOOLEAN]
-
See Mail::Message::modified()
- moveTo FOLDER
-
See Mail::Box::Message::moveTo()
- parent
-
See Mail::Message::parent()
- print [FILEHANDLE]
-
See Mail::Message::print()
- send [MAILER], OPTIONS
-
See Mail::Message::send()
- seqnr [INTEGER]
-
See Mail::Box::Message::seqnr()
- size
-
See Mail::Message::size()
- toplevel
-
See Mail::Message::toplevel()
The Header
Header Shortcuts
- bcc
-
See Mail::Message::bcc()
- cc
-
See Mail::Message::cc()
- date
-
See Mail::Message::date()
- destinations
-
See Mail::Message::destinations()
- from
-
See Mail::Message::from()
- get FIELD
-
See Mail::Message::get()
- guessTimestamp
-
See Mail::Message::guessTimestamp()
- nrLines
-
See Mail::Message::nrLines()
- sender
-
See Mail::Message::sender()
- subject
-
See Mail::Message::subject()
- timestamp
-
See Mail::Message::timestamp()
- to
-
See Mail::Message::to()
The Body
- body [BODY]
-
See Mail::Message::body()
- decoded OPTIONS
-
See Mail::Message::decoded()
- encode OPTIONS
-
See Mail::Message::encode()
- isMultipart
-
See Mail::Message::isMultipart()
- parts ['ALL'|'ACTIVE'|'DELETED'|'RECURSE'|FILTER]
-
See Mail::Message::parts()
Access to the Message
- file
-
See Mail::Message::Construct::file()
- lines
-
See Mail::Message::Construct::lines()
- string
-
See Mail::Message::Construct::string()
Labels
- delete
-
See Mail::Box::Message::delete()
- deleted [BOOLEAN]
-
See Mail::Box::Message::deleted()
- label LABEL [,VALUE [LABEL, VALUE] ]
-
See Mail::Message::label()
- labels
-
See Mail::Message::labels()
Reading and Writing [internals]
- DESTROY
-
See Mail::Message::DESTROY()
- create FILENAME
-
Create the message in the specified file. If the message already has a filename and is not modified, then a move is tried. Otherwise the message is printed to the file. If the FILENAME already exists for this message, nothing is done. In any case, the new FILENAME is set as well.
- isDelayed
-
See Mail::Message::isDelayed()
- labelsToStatus
-
See Mail::Message::labelsToStatus()
- loadBody
-
This method is called by the autoloader when the body of the message is needed.
- loadHead
-
This method is called by the autoloader when the header of the message is needed.
- parser
-
Create and return a parser for this message (-file).
- readFromParser PARSER, [BODYTYPE]
-
See Mail::Message::readFromParser()
- readHead PARSER [,CLASS]
-
See Mail::Message::readHead()
- statusToLabels
-
See Mail::Message::statusToLabels()
- storeBody BODY
-
See Mail::Message::storeBody()
- takeMessageId [STRING]
-
See Mail::Message::takeMessageId()
Logging and Tracing
- defaultTrace [LEVEL, [LEVEL]
-
See Mail::Reporter::defaultTrace()
- diskDelete
-
See Mail::Box::Message::diskDelete()
- errors
-
See Mail::Reporter::errors()
- log [LEVEL [,STRINGS]]
-
See Mail::Reporter::log()
- printStructure [FILEHANDLE][, INDENT]
-
See Mail::Message::Construct::printStructure()
- readBody PARSER, HEAD [, BODYTYPE]
-
See Mail::Box::Message::readBody()
- report [LEVEL]
-
See Mail::Reporter::report()
- reportAll [LEVEL]
-
See Mail::Reporter::reportAll()
- shortString
-
See Mail::Box::Message::shortString()
- trace [LEVEL]
-
See Mail::Reporter::trace()
- warnings
-
See Mail::Reporter::warnings()
Other Methods
- AUTOLOAD
-
See Mail::Reporter::AUTOLOAD()
- inGlobalDestruction
-
See Mail::Reporter::inGlobalDestruction()
- logPriority LEVEL
-
See Mail::Reporter::logPriority()
- logSettings
-
See Mail::Reporter::logSettings()
- notImplemented
-
See Mail::Reporter::notImplemented()
SEE ALSO
A good start to read is Mail::Box-Overview. More documentation and a mailinglist are available from the project's website at http://perl.overmeer.net/mailbox/.
AUTHOR
Mark Overmeer (mark@overmeer.net) with the help of many.
VERSION
This code is beta, version 2.022.
Copyright (c) 2001-2002 Mark Overmeer. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.