See METHODS in Mail::Reporter
The new
can have many OPTIONS. Not only the ones listed here below,
but also all the OPTIONS for Mail::Transport::IMAP4::new() can be
passed.
The default depends on the value of new(cache_head).
Without folder name, no folder is selected. Only few methods are
available now, for instance listSubFolders() to get the top-level
folder names. Usually, the folder named INBOX
will be present.
Option | Defined in | Default |
---|---|---|
access | Mail::Box | 'r' |
body_delayed_type | Mail::Box | |
body_type | Mail::Box | |
cache_body |
| |
cache_head |
| |
cache_labels |
| |
coerce_options | Mail::Box |
|
create | Mail::Box | <false> |
extract | Mail::Box |
|
field_type | Mail::Box | undef |
fix_headers | Mail::Box | <false> |
folder | Mail::Box |
|
folderdir | Mail::Box | <not used> |
head_delayed_type | Mail::Box | |
head_type | Mail::Box | |
join_connection |
| |
keep_dups | Mail::Box | <false> |
lock_file | Mail::Box | undef |
lock_timeout | Mail::Box | 1 hour |
lock_type | Mail::Box |
|
lock_wait | Mail::Box | 10 seconds |
locker | Mail::Box | undef |
log | Mail::Reporter |
|
manager | Mail::Box | undef |
message_type | Mail::Box | |
multipart_type | Mail::Box | |
password | Mail::Box::Net | undef |
remove_when_empty | Mail::Box | <false> |
save_on_exit | Mail::Box | <true> |
server_name | Mail::Box::Net | undef |
server_port | Mail::Box::Net | 143 |
trace | Mail::Reporter |
|
transporter | ||
trusted | Mail::Box | <false> |
username | Mail::Box::Net | undef |
my $imap = Mail::Box::IMAP4->new(username => 'myname', password => 'mypassword', server_name => 'imap.xs4all.nl'); my $url = 'imap4://user:password@imap.xs4all.nl'); my $imap = $mgr->open($url); my $client = Mail::IMAPClient->new(...); my $imap = Mail::Box::IMAP4->new(imap_client => $client);
Close the folder. In the case of IMAP, more than one folder can use the same connection, therefore, closing a folder does not always close the connection to the server. Only when no folder is using the connection anymore, a logout will be invoked by Mail::Transport::IMAP4::DESTROY()
Option | Defined in | Default |
---|---|---|
force | Mail::Box | <false> |
save_deleted | Mail::Box |
|
write | Mail::Box |
|
Create a transporter object (an instance of Mail::Transport::IMAP4), where CLASS defines the exact object type. As OPTIONS, everything which is acceptable to a transporter initiation can be used (see Mail::Transport::IMAP4::new().
Option | Default |
---|---|
join_connection |
|
Low-level data retreival about one or more messages via IMAP4 from the remote server. Some of this data may differ from the information which is stored in the message objects which are created by MailBox, so you should avoid the use of this method for your own purposes. The IMAP implementation provides some wrappers around this, providing the correct behavior.
An array of MESSAGES may be specified or some MESSAGE SELECTION,
acceptable to Mail::Box::messages(). Examples of the latter are
'ALL'
, 'DELETED'
, or spam
(messages labelled to contain spam).
The INFO contains one or more attributes as defined by the IMAP protocol. You have to read the full specs of the related RFCs to see these.
Read the header for the specified message from the remote server.
undef
is returned in case the message disappeared.
Trying to get the specific message from the server, but it appears to be gone.
Read all data for the specified message from the remote server. Return head and body of the mesasge as list, or an empty list if the MESSAGE disappeared from the server.
The header was read before, but now seems empty: the IMAP4 server does not produce the header lines anymore.
The header of the message was retreived from the IMAP4 server, but the body is not read, for an unknown reason.
Trying to get the specific message from the server, but it appears to be gone.
Returns the object which is the interface to the IMAP4 protocol handler. The IMAP4 handler has the current folder selected. When an OBJECT is specified, it is set to be the transporter from that moment on. The OBJECT must extend Mail::Transport::IMAP4.
The IMAP protocol usually writes the data immediately to the remote server, because that's what the protocol wants. However, some options to new() may delay that to boost performance. This method will, when the folder is being closed, write that info after all.
Option | Defined in | Default |
---|---|---|
force | Mail::Box | <false> |
save_deleted | <false> |
Some folder type have a 'deleted' flag which can be stored in the folder to be performed later. The folder keeps that knowledge even when the folder is rewritten. Well, IMAP4 cannot play that trick.
Option | Defined in | Default |
---|---|---|
messages | Mail::Box | <required> |
transporter | <required> |