Mail::...Message(3pm)
๐ NAME ๐
okay so this is Mail::Box::Net::Message โ one message from a distant folder ๐ โ and it lives on the 3pm shelf, aka your friendly neighborhood User Contributed Perl Documentation. perldoc bestie, we're in it ๐ซถ
๐ฆ INHERITANCE ๐ฆ
this baby has a whole family tree, no cap. look at the lore:
Mail::Box::Net::Message
is a Mail::Box::Message
is a Mail::Message
is a Mail::Reporter
Mail::Box::Net::Message is extended by
Mail::Box::IMAP4::Message
Mail::Box::POP3::Message
so it is a Mail::Box::Message, which is a Mail::Message, which is a Mail::Reporter. and then Mail::Box::IMAP4::Message and Mail::Box::POP3::Message extend it. generational icon behavior honestly ๐
โจ SYNOPSIS โจ
the little taste test, exactly as written:
my $folder = Mail::Box:POP3->new(...);
my $message = $folder->message(10);
(yes, that colon in Mail::Box:POP3 is literally what the docs say, we do not touch the sacred text ๐
)
๐ธ DESCRIPTION ๐ธ
a Mail::Box::Net::Message is one message in a folder that you can only get to through some kind of protocol. remote baddie energy.
right now โ "on this moment", as the source says โ only a POP3 client is actually available. IMAP, DBI, and NNTP are the other candidates ๐ so like, they're on the vision board.
also: Extends "DESCRIPTION" in Mail::Box::Message.
๐ METHODS ๐
Extends "METHODS" in Mail::Box::Message.
๐ซ Constructors
Extends "Constructors" in Mail::Box::Message.
$obj->clone(%options)โ inherited, bestie ๐ see"Constructors"inMail::Message$class->new(%options)โ inherited ๐ see"Constructors"inMail::Reporter
now the option menu for new, and the defaults are giving very much:
-Option --Defined in --Default
body Mail::Message undef
body_type Mail::Box::Message <from folder>
deleted Mail::Message false
field_type Mail::Message undef
folder Mail::Box::Message <required>
head Mail::Message undef
head_type Mail::Message Mail::Message::Head::Complete
labels Mail::Message +{}
messageId Mail::Message undef
message_id Mail::Message undef
modified Mail::Message false
size Mail::Box::Message undef
trusted Mail::Message false
unique <unique string>
and here's each one laid out flat, no crumbs left behind:
body=> $object โ a body object goes here.body_type=> CODE|$class โ code ref or class name, your call.deleted=> BOOLEAN โ yep, boolean.field_type=> $class โ a class name.folder=> $folder โ a folder. it's marked<required>up there, so do not skip her ๐head=> $object โ a head object goes here.head_type=> $class โ a class name.labels=> @pairs|%settings โ array-of-pairs ref or hash-of-settings ref, either format eats.messageId=> $id โ an id.message_id=> $id โ also an id. no that's not a typo, both spellings really are listed, iykyk ๐modified=> BOOLEAN โ boolean, yes.size=> $bytes โ size in bytes.trusted=> BOOLEAN โ boolean again, slay.unique=> STRING โ "the unique keys which identifies this message on the remote server." that's the glow-up name tag for this message over on the remote side ๐ฅ
๐ง Attributes
Extends "Attributes" in Mail::Box::Message.
$obj->bodyType()โ inherited, see"Attributes"inMail::Message$obj->fieldType()โ inherited, see"Attributes"inMail::Message$obj->folder( [$folder] )โ inherited, see"Attributes"inMail::Box::Message$obj->headType()โ inherited, see"Attributes"inMail::Message$obj->messageId()โ inherited, see"Attributes"inMail::Message$obj->seqnr( [$integer] )โ inherited, see"Attributes"inMail::Box::Message$obj->unique( [STRING|undef] )โ okay so this one returns the name of the file in which this message is actually stored ๐. it will return"undef"when the message is not stored in a file. and when you hand it a"STRING", a new identifier gets stored first. periodt.
๐ Constructing a message
Extends "Constructing a message" in Mail::Box::Message.
$obj->bounce( [<$rg_object|%options>] )โ inherited, see"Constructing a message"inMail::Message::Construct::Bounce$class->build( [$message|$part|$body], @fields, %options )โ inherited, see"Constructing a message"inMail::Message::Construct::Build$class->buildFromBody($body, [$head], $headers)โ inherited, see"Constructing a message"inMail::Message::Construct::Build$obj->forward(%options)โ inherited, see"Constructing a message"inMail::Message::Construct::Forward$obj->forwardAttach(%options)โ inherited, see"Constructing a message"inMail::Message::Construct::Forward$obj->forwardEncapsulate(%options)โ inherited, see"Constructing a message"inMail::Message::Construct::Forward$obj->forwardInline(%options)โ inherited, see"Constructing a message"inMail::Message::Construct::Forward$obj->forwardNo(%options)โ inherited, see"Constructing a message"inMail::Message::Construct::Forward$obj->forwardPostlude()โ inherited, see"Constructing a message"inMail::Message::Construct::Forward$obj->forwardPrelude()โ inherited, see"Constructing a message"inMail::Message::Construct::Forward$obj->forwardSubject(STRING)โ inherited, see"Constructing a message"inMail::Message::Construct::Forward$class->read($fh|$text|\$text|\@lines, %options)โ inherited, see"Constructing a message"inMail::Message::Construct::Read$obj->rebuild(%options)โ inherited, see"Constructing a message"inMail::Message::Construct::Rebuild$obj->reply(%options)โ inherited, see"Constructing a message"inMail::Message::Construct::Reply$obj->replyPrelude( [STRING|$field|$address|\@addrs|\@fields] )โ inherited, see"Constructing a message"inMail::Message::Construct::Reply$any->replySubject(STRING)โ inherited, see"Constructing a message"inMail::Message::Construct::Reply
๐ The message
Extends "The message" in Mail::Box::Message.
$obj->container()โ inherited, see"The message"inMail::Message$obj->copyTo($folder, %options)โ inherited, see"The message"inMail::Box::Message$obj->endsOnNewline()โ inherited, see"The message"inMail::Message$obj->isDummy()โ inherited, see"The message"inMail::Message$obj->isPart()โ inherited, see"The message"inMail::Message$obj->moveTo($folder, %options)โ inherited, see"The message"inMail::Box::Message$obj->partNumber()โ inherited, see"The message"inMail::Message$obj->print( [$fh] )โ inherited, see"The message"inMail::Message$obj->send( [$mailer], %options )โ inherited, see"The message"inMail::Message$obj->size()โ inherited, see"The message"inMail::Message$obj->toplevel()โ inherited, see"The message"inMail::Message$obj->write( [$fh] )โ inherited, see"The message"inMail::Message
๐ The header
Extends "The header" in Mail::Box::Message.
$obj->bcc()โ inherited, see"The header"inMail::Message$obj->cc()โ inherited, see"The header"inMail::Message$obj->date()โ inherited, see"The header"inMail::Message$obj->destinations()โ inherited, see"The header"inMail::Message$obj->from()โ inherited, see"The header"inMail::Message$obj->get($fieldname)โ inherited, see"The header"inMail::Message$obj->guessTimestamp()โ inherited, see"The header"inMail::Message$obj->head( [$head] )โ inherited, see"The header"inMail::Message$obj->nrLines()โ inherited, see"The header"inMail::Message$obj->sender()โ inherited, see"The header"inMail::Message$obj->study($fieldname)โ inherited, see"The header"inMail::Message$obj->subject()โ inherited, see"The header"inMail::Message$obj->timestamp()โ inherited, see"The header"inMail::Message$obj->to()โ inherited, see"The header"inMail::Message
๐ The body
Extends "The body" in Mail::Box::Message.
$obj->body( [$body] )โ inherited, see"The body"inMail::Message$obj->contentType()โ inherited, see"The body"inMail::Message$obj->decoded(%options)โ inherited, see"The body"inMail::Message$obj->encode(%options)โ inherited, see"The body"inMail::Message$obj->isMultipart()โ inherited, see"The body"inMail::Message$obj->isNested()โ inherited, see"The body"inMail::Message$obj->parts( [<'ALL'|'ACTIVE'|'DELETED'|'RECURSE'|$filter>] )โ inherited, see"The body"inMail::Message
๐ Flags
Extends "Flags" in Mail::Box::Message.
$obj->delete()โ inherited, see"Flags"inMail::Message$obj->deleted( [BOOLEAN] )โ inherited, see"Flags"inMail::Message$obj->isDeleted()โ inherited, see"Flags"inMail::Message$obj->isModified()โ inherited, see"Flags"inMail::Message$obj->label($label|PAIRS)โ inherited, see"Flags"inMail::Message$obj->labels()โ inherited, see"Flags"inMail::Message$obj->labelsToStatus()โ inherited, see"Flags"inMail::Message$obj->modified( [BOOLEAN] )โ inherited, see"Flags"inMail::Message$obj->statusToLabels()โ inherited, see"Flags"inMail::Message
๐ฅ The whole message as text
Extends "The whole message as text" in Mail::Box::Message.
$obj->file()โ inherited, see"The whole message as text"inMail::Message::Construct::Text$obj->lines()โ inherited, see"The whole message as text"inMail::Message::Construct::Text$obj->printStructure( [$fh|undef],[$indent] )โ inherited, see"The whole message as text"inMail::Message::Construct::Text$obj->string()โ inherited, see"The whole message as text"inMail::Message::Construct::Text
๐ Internals
Extends "Internals" in Mail::Box::Message.
$obj->clonedFrom()โ inherited, see"Internals"inMail::Message$class->coerce($message, %options)โ inherited, see"Internals"inMail::Message$obj->diskDelete()โ inherited, see"Internals"inMail::Box::Message$obj->isDelayed()โ inherited, see"Internals"inMail::Message$obj->isTrusted()โ inherited, see"Internals"inMail::Message$obj->loadBody()โ no "inherited" note on this one bestie, it's listed right here under Internals with nothing else attached.$obj->readBody( $parser, $head, [$bodytype] )โ inherited, see"Internals"inMail::Box::Message$obj->readFromParser( $parser, [$bodytype] )โ inherited, see"Internals"inMail::Message$obj->readHead( $parser, [$class] )โ inherited, see"Internals"inMail::Message$obj->recursiveRebuildPart($part, %options)โ inherited, see"Internals"inMail::Message::Construct::Rebuild$obj->storeBody($body)โ inherited, see"Internals"inMail::Message$obj->takeMessageId( [STRING] )โ inherited, see"Internals"inMail::Message
๐ Error handling
Extends "Error handling" in Mail::Box::Message.
$obj->AUTOLOAD()โ inherited, see"METHODS"inMail::Message::Construct$obj->notImplemented()โ inherited, see"Error handling"inMail::Reporter$any->shortSize( [$value] )โ inherited, see"Error handling"inMail::Message$obj->shortString()โ inherited, see"Error handling"inMail::Message
๐งผ Cleanup
Extends "Cleanup" in Mail::Box::Message.
$obj->DESTROY()โ inherited, see"Cleanup"inMail::Reporter$obj->destruct()โ inherited, see"Cleanup"inMail::Box::Message
โญ DETAILS โญ
Extends "DETAILS" in Mail::Box::Message.
and that's the tea so far โ part 2 is still coming, bestie โ don't go anywhere ๐
๐ฉบ๐ DIAGNOSTICS ๐๐ฉบ
okay bestie, this is the part where the module is like "hey, here's what went wrong, and yes I'm telling you exactly which method snitched on you." every single one of these is real, so read the whole list, no skipping ๐
Error: Cannot include forward source as $kind.โ so you handedforward(include)an alternative it does not vibe with. the only choices it accepts, periodt, are"NO","INLINE","ATTACH", and"ENCAPSULATE". thrown byforward()๐ซถError: No default mailer found to send message.โ thesend()machinery lowkey did not have enough info to go find a mail transfer agent all by itself to send this message. so just tell it one explicitly using theviaoptions. thrown bysend()โจError: cannot coerce a $type object into a $me object.โ thrown bycoerce()๐Error: cannot include reply source as $kind.โ you gave theincludeoption ofreply()an alternative it does not recognize. the valid choices are"NO","INLINE", and"ATTACH". thrown byreply()๐Error: cannot read message from a $source.โ thrown byread()๐ญError: class $package does not implement method $method.โ okay this one is a fatal error, so listen up: that specific$package(or one of its superclasses) genuinely does not implement this method where it's supposed to. the tea here is that some other related classes do implement it, and this class at hand justโฆ doesn't ๐ญ so you should probably investigate this, and probably inform the author of the package. thrown bynotImplemented()๐Error: coercion starts with some object, not '$type'.โ thrown bycoerce()๐Error: method bounce requires To, Cc, or Bcc.โbounce()forwards a received message off to someone else without modification, so you have to tell it where it's going. and if you're feeling the urge to not specify any destination at all? you're probably looking forreply(). and if you want to actually change the content, useforward(). thrown bybounce()๐Error: method forwardAttach requires a preamble.โ thrown byforwardAttach()๐Error: method forwardEncapsulate requires a preamble.โ thrown byforwardEncapsulate()๐ธError: method forwardNo requires a To.โ thrown byforwardNo()๐ฎError: method forwardNo requires a body.โ thrown byforwardNo()๐Error: no rebuild rule $name defined.โ thrown byrebuild()๐งError: only build() Mail::Message's; they are not in a folder yet.โ so you want to construct a message that's gonna live in some kind of folder, right? that's a two-step situation, bestie. step one: create a normalMail::Message. step two: add it to the folder. and during thatMail::Box::addMessage()process, the message getscoerce()-d into the right message type, picking up storage information and all that good stuff along the way. thrown bybuild()๐งError: please install Email::Simple.โ thrown bycoerce()๐ฆError: please install MIME::Entity.โ thrown bycoerce()๐ฆError: please install Mail::Internet.โ thrown bycoerce()๐ฆError: select parts via '$what'?โ thrown byparts()๐คจWarning: skipped unknown key '$key' in build.โ thrown bybuild()โ ๏ธError: unable to read delayed body for $msgid.โ thrown byloadBody()๐ตError: unable to read delayed head for $msgid.โ thrown byloadBody()๐ต
๐ SEE ALSO ๐
this module is part of Mail-Box version 4.02, built on April 10, 2026 ๐
the website is: http://perl.overmeer.net/CPAN/ ๐
๐ LICENSE ๐
for contributors, see the file ChangeLog โ๏ธ
this software is copyright (c) 2001-2026 by Mark Overmeer ๐
it's free software, bestie โ you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself ๐ซถ
and that's a wrap on this page, angel ๐
it was built off perl v5.40.1 and dated 2026-05-09, so yeah โ consider this manual your little timestamped love letter from the Mail::Message team. go forth and slay those messages โจ๐ฆ๐
๐ฆ where this page comes from
- ubuntu stonking: libmail-box-perl 4.02-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms