See METHODS in Mail::Reporter
Option | Defined in | Default |
---|---|---|
body | Mail::Message | undef |
body_type | <from folder> | |
deleted | Mail::Message | <false> |
field_type | Mail::Message | undef |
folder | <required> | |
head | Mail::Message | undef |
head_type | Mail::Message | |
labels | Mail::Message | {} |
log | Mail::Reporter |
|
messageId | Mail::Message | undef |
modified | Mail::Message | <false> |
size | undef | |
trace | Mail::Reporter |
|
trusted | Mail::Message | <false> |
Copy the message to the indicated opened FOLDER, without deleting the original. The coerced message (the clone in the destination folder) is returned.
Option | Default |
---|---|
shallow | <false> |
shallow_body | <false> |
shallow_head | <false> |
share | <false> |
my $draft = $mgr->open(folder => 'Draft'); $message->copyTo($draft, share => 1);
In with folder did we detect this message/dummy? This is a reference to the folder-object.
Move the message from this folder to the FOLDER specified. This will create a copy using clone() first. Then, this original message is flagged to get deleted. So until the source folder is closed, two copies of the message may stay in memory.
The newly created message clone (part of the destination folder) is returned. All OPTIONS are passed to copyTo()
Option | Default |
---|---|
shallow_body | <undef> |
share | <true unless shallow_body exists> |
my $trash = Mail::Box::Mbox->new(folder => 'trash'); my $t = $msg->moveTo($trash);
is equivalent to
my $t = $msg->copyTo($trash, share => 1); $msg->delete;
Get the number of this message is the current folder. It starts counting from zero. Do not change the number.
Remove a message from disk. This is not from the folder, but everything else, like parts of the message which are stored outside from the folder.
Read the body of one message. The PARSER gives access to the folder file. The HEAD has been read with readHead(). The optional BODYTYPE supplies the class name of the body to be created, or a code reference to a routine which can produce a body type based on the head (passed as first argument).
By default, the BODYTYPE will call Mail::Box::determineBodyType() where the message will be added to.
Removes most of the memory occupied by the message by detaching the header and body. Then, the object changes into a Mail::Box::Message::Destructed which will catch all attempts to access the header and body. Be careful with the usage of this method.