OVERLOADED

overload: ""
See "" in Mail::Box.
overload: @{}
See @{} in Mail::Box.
overload: cmp
See cmp in Mail::Box.

METHODS

See METHODS in Mail::Reporter

Constructors

$class->new( OPTIONS )
Option Defined in Default

access

Mail::Box

'r'

body_delayed_type

Mail::Box

Mail::Message::Body::Delayed

body_type

Mail::Box

Mail::Message::Body::Lines

coerce_options

Mail::Box

[]

create

Mail::Box

<false>

directory

Mail::Box::Dir

<derived from folder name>

extract

Mail::Box

10240

field_type

Mail::Box

undef

fix_headers

Mail::Box

<false>

folder

Mail::Box

$ENV{MAIL}

folderdir

Mail::Box

$ENV{HOME}/.mh

head_delayed_type

Mail::Box

Mail::Message::Head::Delayed

head_type

Mail::Box

Mail::Message::Head::Complete

index

undef

index_filename

<foldername>/.index

index_type

Mail::Box::MH::Index

keep_dups

Mail::Box

<false>

keep_index

0

labels

undef

labels_filename

<foldername>/.mh_sequence

labels_type

Mail::Box::MH::Labels

lock_file

Mail::Box

<index_file>

lock_timeout

Mail::Box

1 hour

lock_type

Mail::Box

Mail::Box::Locker::DotLock

lock_wait

Mail::Box

10 seconds

locker

Mail::Box

undef

log

Mail::Reporter

'WARNINGS'

manager

Mail::Box

undef

message_type

Mail::Box

Mail::Box::Message

multipart_type

Mail::Box

Mail::Message::Body::Multipart

remove_when_empty

Mail::Box

<true>

save_on_exit

Mail::Box

<true>

trace

Mail::Reporter

'WARNINGS'

trusted

Mail::Box

<depends on folder location>

access => MODE
body_delayed_type => CLASS
body_type => CLASS|CODE
coerce_options => ARRAY
create => BOOLEAN
directory => DIRECTORY
extract => INTEGER | CODE | METHOD | 'LAZY'|'ALWAYS'
field_type => CLASS
fix_headers => BOOLEAN
folder => FOLDERNAME
folderdir => DIRECTORY
head_delayed_type => CLASS
head_type => CLASS
index => OBJECT
You may specify an OBJECT of a type which extends Mail::Box::MH::Index (at least implements a get() method), as alternative for an index file reader as created by Mail::Box::MH.
index_filename => FILENAME
The FILENAME which is used in each directory to store the headers of all mails. The filename shall not contain a directory path. (e.g. Do not use /usr/people/jan/.index, nor subdir/.index, but say .index.)
index_type => CLASS
keep_dups => BOOLEAN
keep_index => BOOLEAN
Keep an index file of the specified mailbox, one file per directory. Using an index file will speed up things considerably, because it avoids reading all the message files the moment that you open the folder. When you open a folder, you can use the index file to retrieve information such as the subject of each message, instead of having to read possibly thousands of messages.
labels => OBJECT
You may specify an OBJECT of a type which extends Mail::Box::MH::Labels (at least implements the get() method), as alternative for labels file reader as created by Mail::Box::MH.
labels_filename => FILENAME
In MH-folders, messages can be labeled, for instance based on the sender or whether it is read or not. This status is kept in a file which is usually called .mh_sequences, but that name can be overruled with this flag.
labels_type => CLASS
lock_file => FILENAME
lock_timeout => SECONDS
lock_type => CLASS|STRING|ARRAY
lock_wait => SECONDS
locker => OBJECT
log => LEVEL
manager => MANAGER
message_type => CLASS
multipart_type => CLASS
remove_when_empty => BOOLEAN
save_on_exit => BOOLEAN
trace => LEVEL
trusted => BOOLEAN

The folder

$obj->addMessage( MESSAGE, OPTIONS )
See addMessage in Mail::Box.
$obj->addMessages( MESSAGE [, MESSAGE, ...] )
See addMessages in Mail::Box.
$class->appendMessages( OPTIONS )

Append a message to a folder which is not open.

Option Defined in Default

folder

Mail::Box

<required>

message

Mail::Box

undef

messages

Mail::Box

undef

share

Mail::Box

<false>

folder => FOLDERNAME
message => MESSAGE
messages => ARRAY-OF-MESSAGES
share => BOOLEAN
» Error: Cannot append message without lock on $folder.

It is impossible to append one or more messages to the folder which is not opened, because locking it failes. The folder may be in use by an other application, or you may need to specify some lock related options (see new()).

» Error: Unable to write message for $folder to $filename: $!

The new message could not be written to its new file, for the specific reason.

$obj->close( OPTIONS )
See close in Mail::Box.
$obj->copyTo( FOLDER, OPTIONS )
See copyTo in Mail::Box.
$obj->delete( OPTIONS )
See delete in Mail::Box.
$obj->directory
See directory in Mail::Box::Dir.
$obj->folderdir( [DIRECTORY] )
See folderdir in Mail::Box.
$obj->name
See name in Mail::Box.
$obj->organization
See organization in Mail::Box.
$obj->size
See size in Mail::Box.
$obj->type
See type in Mail::Box.
$obj->update( OPTIONS )
See update in Mail::Box.
$obj->url
See url in Mail::Box.

Folder flags

$obj->access
See access in Mail::Box.
$obj->isModified
See isModified in Mail::Box.
$obj->modified( [BOOLEAN] )
See modified in Mail::Box.
$obj->writable
See writable in Mail::Box.

The messages

$obj->current( [NUMBER|MESSAGE|MESSAGE-ID] )
See current in Mail::Box.
$obj->find( MESSAGE-ID )
See find in Mail::Box.
$obj->findFirstLabeled( LABEL, [BOOLEAN, [ARRAY-OF-MSGS]] )
See findFirstLabeled in Mail::Box.
$obj->message( INDEX [,MESSAGE] )
See message in Mail::Box.
$obj->messageId( MESSAGE-ID [,MESSAGE] )
See messageId in Mail::Box.
$obj->messageIds
See messageIds in Mail::Box.
$obj->messages( ['ALL',RANGE,'ACTIVE','DELETED',LABEL,!LABEL,FILTER] )
See messages in Mail::Box.
$obj->nrMessages( OPTIONS )
See nrMessages in Mail::Box.
$obj->scanForMessages( MESSAGE, MESSAGE-IDS, TIMESPAN, WINDOW )
See scanForMessages in Mail::Box.

Sub-folders

$obj->listSubFolders( OPTIONS )
$class->listSubFolders( OPTIONS )
See listSubFolders in Mail::Box.
$obj->nameOfSubFolder( SUBNAME, [PARENTNAME] )
$class->nameOfSubFolder( SUBNAME, [PARENTNAME] )
See nameOfSubFolder in Mail::Box.
$obj->openRelatedFolder( OPTIONS )
See openRelatedFolder in Mail::Box.
$obj->openSubFolder( SUBNAME, OPTIONS )
See openSubFolder in Mail::Box.
$obj->topFolderWithMessages
$class->topFolderWithMessages
See topFolderWithMessages in Mail::Box.

Internals

$obj->coerce( MESSAGE, OPTIONS )
See coerce in Mail::Box.
$obj->create( FOLDERNAME, OPTIONS )
$class->create( FOLDERNAME, OPTIONS )
Option Defined in Default

folderdir

Mail::Box

undef

folderdir => DIRECTORY
» Error: Cannot create MH folder $name: $!

For some reason, it is impossible to create the folder. Check the permissions and the name of the folder. Does the path to the directory to be created exist?

$obj->determineBodyType( MESSAGE, HEAD )
See determineBodyType in Mail::Box.
$obj->folderToDirectory( FOLDERNAME, FOLDERDIR )
See folderToDirectory in Mail::Box::Dir.
$class->foundIn( [FOLDERNAME], OPTIONS )
See foundIn in Mail::Box.
$obj->highestMessageNumber

Returns the highest number which is used in the folder to store a file. This method may be called when the folder is read (then this number can be derived without file-system access), but also when the folder is not read (yet).

$obj->index

Create a index reader/writer object.

$obj->labels

Create a label reader/writer object.

$obj->lineSeparator( [STRING|'CR'|'LF'|'CRLF'] )
See lineSeparator in Mail::Box.
$obj->locker
See locker in Mail::Box.
$obj->read( OPTIONS )
See read in Mail::Box.
$obj->readMessageFilenames( DIRECTORY )
See readMessageFilenames in Mail::Box::Dir.
$obj->readMessages( OPTIONS )
See readMessages in Mail::Box.
$obj->storeMessage( MESSAGE )
See storeMessage in Mail::Box.
$obj->toBeThreaded( MESSAGES )
See toBeThreaded in Mail::Box.
$obj->toBeUnthreaded( MESSAGES )
See toBeUnthreaded in Mail::Box.
$obj->updateMessages( OPTIONS )
See updateMessages in Mail::Box.
$obj->write( OPTIONS )
See write in Mail::Box.
$obj->writeMessages( OPTIONS )
Option Defined in Default

messages

Mail::Box

<required>

renumber

<true>

messages => ARRAY
renumber => BOOLEAN
Permit renumbering of message. By default this is true, but for some unknown reason, you may be thinking that messages should not be renumbered.
» Error: Cannot write folder $name without lock.

It is impossible to get a lock on the folder, which means that the changes can not be made. You may need to tune the lock related options which are available at folder creation.

Other methods

$obj->timespan2seconds( TIME )
$class->timespan2seconds( TIME )
See timespan2seconds in Mail::Box.

Error handling

$obj->AUTOLOAD
See AUTOLOAD in Mail::Reporter.
$obj->addReport( OBJECT )
See addReport in Mail::Reporter.
$obj->defaultTrace( [LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK] )
$class->defaultTrace( [LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK] )
See defaultTrace in Mail::Reporter.
$obj->errors
See errors in Mail::Reporter.
$obj->log( [LEVEL [,STRINGS]] )
$class->log( [LEVEL [,STRINGS]] )
See log in Mail::Reporter.
$obj->logPriority( LEVEL )
$class->logPriority( LEVEL )
See logPriority in Mail::Reporter.
$obj->logSettings
See logSettings in Mail::Reporter.
$obj->notImplemented
See notImplemented in Mail::Reporter.
$obj->report( [LEVEL] )
See report in Mail::Reporter.
$obj->reportAll( [LEVEL] )
See reportAll in Mail::Reporter.
$obj->trace( [LEVEL] )
See trace in Mail::Reporter.
$obj->warnings
See warnings in Mail::Reporter.

Cleanup

$obj->DESTROY
See DESTROY in Mail::Box.
$obj->inGlobalDestruction
See inGlobalDestruction in Mail::Reporter.