FIRSTKEY() returns the first message-id/message pair from the folder, and NEXTKEY returns the message-id/message pair for the next message, in the order in which the message is stored in the folder.
Messages flagged for deletion will not be returned. See the Mail::Box::messages() method of the folder type for more information about the folder message order.
foreach my $msgid (keys %inbox) ... foreach my $msg (values %inbox) ... while(my ($msgid, $msg) = each %inbox) { $msg->print unless $msg->isDeleted; }
Store a message in the folder. The key must be undef
, because the
message-id of the specified message is taken. This is shown in the
first example. However, as you see, it is a bit complicated to specify
undef
, therefore the string "undef"
is accepted as well.
The message may be converted into something which can be stored in the folder type which is at stake. The added instance is returned.
$inbox{ (undef) } = $msg; $inbox{undef} = $msg;