| MailFolder documentation | view source | Contained in the MailFolder distribution. |
open method.$folder_name directory, add
the message_number to the list of messages in the object.$folder_dir/.current_msg into
$self->{Current}.current_message.sync method.-1 if the folder is readonly.-1 if the folder cannot be locked.opened or synced
and absorb them..current_msg file and the .msg_labels file if
the NotMUA option is not set.Mail::Folder::Emaul - An Emaul folder interface for Mail::Folder.
WARNING: This code is in alpha release. Expect the interface to change.
use Mail::Folder::Emaul;
This module provides an interface to the emaul folder mechanism. It is currently intended to be used as an example of hooking a folder interface into Mail::Folder.
The folder structure of Emaul is styled after mh. It uses
directories for folders and numerically-named files for the individual
mail messages. The current message for a particular folder is stored
in a file .current_msg in the folder directory.
Folder locking is accomplished through the use of a .lock file in the folder directory.
If a Timeout option is specified when the object is created, that
value will be used to determine the timeout for attempting to aquire
a folder lock. The default is 10 seconds.
Populates the Mail::Folder object with information about the
folder.
open method.$folder_name directory, add
the message_number to the list of messages in the object.$folder_dir/.current_msg into
$self->{Current}.current_message.Flushes any pending changes out to the original folder.
sync method.-1 if the folder is readonly.-1 if the folder cannot be locked.opened or synced
and absorb them..current_msg file and the .msg_labels file if
the NotMUA option is not set.Calls the superclass pack method.
Return 0 if the folder is readonly.
Return 0 if the folder cannot be locked.
Renames the message files in the folder so that there are no gaps in
the numbering sequence. It will tweak current_message accordingly.
Old deleted message files (ones that start with ,) are also renamed
as necessary.
It will abandon the operation and return 0 if a rename fails,
otherwise it returns 1.
Please note that pack acts on the real folder.
Calls the superclass get_message method.
Retrieves the given mail message file into a Mail::Internet object reference and returns the reference.
It will coerce the From_ field into a Mail-From field, add the
'seen' label to the message, remove the Content-Length field
if present, and cache the header.
Returns undef on failure.
Calls the superclass get_message_file method.
Retrieves the given mail message file and returns the name of the file.
Returns undef on failure.
Calls the superclass get_header method.
If the particular header has never been retrieved then get_header
loads the header of the given mail message into a member of
$self->{Messages}{$msg_number} and returns the object reference
If the header for the given mail message has already been retrieved in
a prior call to get_header, then the cached entry is returned.
The Content-Length field is deleted from the header object it
returns.
Calls the superclass append_message method.
Returns 0 if it cannot lock the folder.
Appends the contents of the mail message contained $mref to
the the folder.
It also caches the header.
Please note that, contrary to other documentation for Mail::Folder,
the Emaul append_message method actually updates the real folder,
rather than queueing it up for a subsequent sync. The dup and
refile methods are also affected. This will be fixed soon.
Calls the superclass update_message method.
It returns 0 if it cannot lock the folder.
Replaces the message pointed to by $msg_number with the contents of
the Mail::Internet object reference $mref.
Please note that, contrary to other documentation for Mail::Folder,
the Emaul update_message method actually updates the real folder,
rather than queueing it up for a subsequent sync. This will be fixed
soon.
Returns 0 if the folder is not a directory or looks like a maildir
folder. The current logic allows it to handle MH directories, but
watch out; you should probably set the NotMUA option so the
interface doesn't create it's own little folder droppings like
.msg_labels and such.
Returns 0 if the folder already exists.
Creates a new folder named $foldername with mode 0700 and then
returns 1.
Kevin Johnson <kjj@pobox.com>
Copyright (c) 1996-1998 Kevin Johnson <kjj@pobox.com>.
All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| MailFolder documentation | view source | Contained in the MailFolder distribution. |