Mail::Box::Net(3pm)
π Mail::Box::Net π
okay so this is Mail::Box::Net, from the User Contributed Perl Documentation (section 3pm), and bestieβ¦ it's the module for when your folders aren't chilling on your own disk but live somewhere remote. it's mostly a superclass, so no cap, you don't use it directly. buckle up, this is part one of two π
β¨ NAME β¨
Mail::Box::Net β handle folders which are stored remote.
likeβ¦ the folder exists, but somewhere else. on a server. far away. iconic π
π¦ INHERITANCE π¦
Mail::Box::Net
is a Mail::Box
is a Mail::Reporter
Mail::Box::Net is extended by
Mail::Box::IMAP4
Mail::Box::POP3
so it's a Mail::Box, which is a Mail::Reporter (the whole family tree, we love a lineage π), and then Mail::Box::IMAP4 and Mail::Box::POP3 build on top of it. main character energy all around.
πΈ SYNOPSIS πΈ
# Do not instantiate this object directly
that's it. that's the whole synopsis. do not make one of these yourself, bestie, it's giving "abstract base class" and the subclasses handle the actual protocol stuff π
π«Ά DESCRIPTION π«Ά
at the moment, this object is extended by:
Mail::Box::POP3β implements the POP3 protocol.Mail::Box::IMAP4β implements the IMAP4 protocol.
Extends "DESCRIPTION" in Mail::Box.
π₯ OVERLOADED π₯
Extends "OVERLOADED" in Mail::Box.
- overload:
'""'stringification β inherited, see "OVERLOADED" in Mail::Box - overload:
'@{}'use as ARRAY β inherited, see "OVERLOADED" in Mail::Box - overload:
cmpstring comparison β inherited, see "OVERLOADED" in Mail::Box
π METHODS π
Extends "METHODS" in Mail::Box.
π Constructors π
Extends "Constructors" in Mail::Box.
$class->new(%options)
inherited, see "Constructors" in Mail::Box.
here's the whole vibe table of what you can pass in β option, where it's defined, and its default. no skipping, we list every single one:
accessβ defined inMail::Boxβ default'r'body_delayed_typeβ defined inMail::Boxβ defaultMail::Message::Body::Delayedbody_typeβ defined inMail::Boxβ defaultMail::Message::Body::Linescoerce_optionsβ defined inMail::Boxβ default+[]createβ defined inMail::Boxβ defaultfalseextractβ defined inMail::Boxβ default10240field_typeβ defined inMail::Boxβ defaultundeffix_headersβ defined inMail::Boxβ defaultfalsefolderβ defined inMail::Boxβ default'/'folderdirβ defined inMail::Boxβ default<network location>head_delayed_typeβ defined inMail::Boxβ defaultMail::Message::Head::Delayedhead_typeβ defined inMail::Boxβ defaultMail::Message::Head::Completekeep_dupsβ defined inMail::Boxβ defaultfalselock_fileβ defined inMail::Boxβ defaultundeflock_timeoutβ defined inMail::Boxβ default1 hourlock_typeβ defined inMail::Boxβ default'NONE'lock_waitβ defined inMail::Boxβ default10 secondslockerβ defined inMail::Boxβ defaultundefmanagerβ defined inMail::Boxβ defaultundefmessage_typeβ defined inMail::Boxβ default<folder-class>::Messagemultipart_typeβ defined inMail::Boxβ defaultMail::Message::Body::Multipartpasswordβ defaultundefremove_when_emptyβ defined inMail::Boxβ default<false>save_on_exitβ defined inMail::Boxβ defaulttrueserver_nameβ defaultundefserver_portβ defaultundeftrustedβ defined inMail::Boxβ default<false>usernameβ defaultundef
and now the same options again but with the actual tea β β the ones that matter here are password, server_name, server_port and username, because remote:
access => $modebody_delayed_type => CLASSbody_type => CLASS|CODEcoerce_options => ARRAYcreate => BOOLEANextract => INTEGER|CODE|METHOD|'LAZY'|'ALWAYS'field_type => $classfix_headers => BOOLEANfolder => $namefolderdir => $directoryhead_delayed_type => $classhead_type => $classkeep_dups => BOOLEANlock_file => $filelock_timeout => $secondslock_type => $class|$name|\@nameslock_wait => $secondslocker => $lockermanager => $managermessage_type => $classmultipart_type => CLASSpassword => $passwordβ the$passwordwhich is required to contact the remote server. πremove_when_empty => BOOLEANsave_on_exit => BOOLEANserver_name => $hostβ the name of the$hostwhich contains the remote mail server. πserver_port => $numberβ port$numberin use by the server application. πtrusted => BOOLEANusername => $usernameβ the username which is to be used for the remote server. π«Ά
π Attributes π
Extends "Attributes" in Mail::Box.
$obj->fixHeaders()β inherited, see "Attributes" in Mail::Box$obj->folderdir( [$directory] )β inherited, see "Attributes" in Mail::Box$obj->isTrusted()β inherited, see "Attributes" in Mail::Box$obj->name()β inherited, see "Attributes" in Mail::Box$obj->removeEmpty()β inherited, see "Attributes" in Mail::Box$obj->type()β inherited, see "Attributes" in Mail::Box
π The folder π
Extends "The folder" in Mail::Box.
$obj->addMessage($message, %options)β inherited, see "The folder" in Mail::Box$obj->addMessages(@messages)β inherited, see "The folder" in Mail::Box$class->appendMessages(%options)β inherited, see "The folder" in Mail::Box$obj->close(%options)β inherited, see "The folder" in Mail::Box$obj->copyTo($folder, %options)β inherited, see "The folder" in Mail::Box$obj->delete(%options)β inherited, see "The folder" in Mail::Box$obj->organization()β inherited, see "The folder" in Mail::Box$obj->size()β inherited, see "The folder" in Mail::Box$obj->update(%options)β inherited, see "The folder" in Mail::Box$obj->url()β inherited, see "The folder" in Mail::Box
πΈ Folder flags πΈ
Extends "Folder flags" in Mail::Box.
$obj->access()β inherited, see "Folder flags" in Mail::Box$obj->isModified()β inherited, see "Folder flags" in Mail::Box$obj->modified( [BOOLEAN] )β inherited, see "Folder flags" in Mail::Box$obj->writable()β inherited, see "Folder flags" in Mail::Box
π The messages π
Extends "The messages" in Mail::Box.
$obj->current( [$number|$message|$message_id] )β inherited, see "The messages" in Mail::Box$obj->find($message_id)β inherited, see "The messages" in Mail::Box$obj->findFirstLabeled( $label, [BOOLEAN, [\@msgs]] )β inherited, see "The messages" in Mail::Box$obj->message( $index, [$message] )β inherited, see "The messages" in Mail::Box$obj->messageId( $message_id, [$message] )β inherited, see "The messages" in Mail::Box$obj->messageIds()β inherited, see "The messages" in Mail::Box$obj->messages( <'ALL'|$range|'ACTIVE'|'DELETED'|$label| !$label|$filter> )β inherited, see "The messages" in Mail::Box$obj->nrMessages(%options)β inherited, see "The messages" in Mail::Box$obj->scanForMessages($message, $message_ids, $timespan, $window)β inherited, see "The messages" in Mail::Box
π¦ Sub-folders π¦
Extends "Sub-folders" in Mail::Box.
$any->listSubFolders(%options)β inherited, see "Sub-folders" in Mail::Box$any->nameOfSubFolder( $subname, [$parentname] )β inherited, see "Sub-folders" in Mail::Box$obj->openRelatedFolder(%options)β inherited, see "Sub-folders" in Mail::Box$obj->openSubFolder($subname, %options)β inherited, see "Sub-folders" in Mail::Box$any->topFolderWithMessages()β inherited, see "Sub-folders" in Mail::Box
π Internals π
Extends "Internals" in Mail::Box.
$obj->coerce($message, %options)β inherited, see "Internals" in Mail::Box$any->create($folder, %options)β create a new folder on the remote server. improves base, see "Internals" in Mail::Box β¨
-Option --Defined in--Default
folderdir Mail::Box undef
folderdir => $directory
$obj->determineBodyType($message, $head)β inherited, see "Internals" in Mail::Box$class->foundIn( [$foldername], %options )β inherited, see "Internals" in Mail::Box$obj->lineSeparator( [<STRING|'CR'|'LF'|'CRLF'>] )β inherited, see "Internals" in Mail::Box$obj->locker()β inherited, see "Internals" in Mail::Box$obj->read(%options)β inherited, see "Internals" in Mail::Box$obj->readMessages(%options)β inherited, see "Internals" in Mail::Box$obj->storeMessage($message)β inherited, see "Internals" in Mail::Box$obj->toBeThreaded($messages)β inherited, see "Internals" in Mail::Box$obj->toBeUnthreaded($messages)β inherited, see "Internals" in Mail::Box$obj->updateMessages(%options)β inherited, see "Internals" in Mail::Box$obj->write(%options)β inherited, see "Internals" in Mail::Box$obj->writeMessages(%options)β inherited, see "Internals" in Mail::Box
β Other methods β
Extends "Other methods" in Mail::Box.
$any->timespan2seconds($time)β inherited, see "Other methods" in Mail::Box
π Error handling π
Extends "Error handling" in Mail::Box.
$obj->AUTOLOAD()β inherited, see "Error handling" in Mail::Reporter$obj->notImplemented()β inherited, see "Error handling" in Mail::Reporter
π§ Cleanup π§
Extends "Cleanup" in Mail::Box.
$obj->DESTROY()β inherited, see "Cleanup" in Mail::Box
π DETAILS π
Extends "DETAILS" in Mail::Box.
π
π DIAGNOSTICS π
okay bestie, listen π β these are the messages this module will throw at you when the vibe check fails. Read them, learn them, love them, because they're your map to Whatever Went Wrongβ’.
Error: Folder $name is opened read-onlyβ so you're tryna write to a folder that's living its read-only truth π βοΈ. You can't do that unless you opened it to write or append throughnew(access), or you set the"force"option to"true". Cast bywrite(). Periodt.Warning: changes not written to read-only folder $name.β the classic. You opened the folder read-only (which is literally the default set bynew(access)), you made a bunch of lil modifications, and now you wanna close it? Girl. Setclose(force)if you want to overrule the access mode, or close the folder withclose(write)set to"NEVER". Cast byclose().Error: class $package does not implement method $method.β fatal error, no cap π. That specific$package(or one of its superclasses) just doesn't implement this method where it's supposed to. What this means: other related classes do implement it, but the class in your hands does not. You should probably investigate this, and probably slide into the author of the package's DMs about it. Cast bynotImplemented().Error: copying failed for one message.β for some reason β disk full, an external process yeeted it, read-protection, whatever β one of the messages could not be copied. Copying is gonna keep going for the other messages though, so not all is lost π . Cast bycopyTo().Error: destination folder $name is not writable.β the folder you're copying messages to isn't opened with write access (peepnew(access)). And no, this has nothing to do with write permission to the folder controlled by your operating system, so don't come at me withls -lreceipts π. Cast bycopyTo().Warning: different messages with id $msgid.β the message id showed up more than once inside the same folder, but the content of those messages looks different. This should not be possible: each message must be unique, bestie. Something is sus. Cast bymessageId().Warning: folder $name not deleted: not writable.β folder's gotta be opened with write access vianew(access)or removing it gets refused. So yeah, you might have write-access per the operating system, but that will not automatically mean this"delete"method lets you do it. And the reverse remark is valid as well π. Cast bydelete().Error: invalid timespan '$span'.β that string does not follow the strict rules of the time span syntax that's permitted as a parameter. Cast bytimespan2seconds().Warning: message-id '$msgid' does not contain a domain.β per the RFCs, message-ids need a unique random part, then an"@", then a domain name. This exists to avoid creating two messages with the same id. The warning pops up when the"@"is missing from the string. Cast bymessageId().Warning: the term 'hostname' is confusing wrt folder. You probably need 'server_name'.β cast bynew().Error: unknown value to folder->close(write => $when).β cast byclose().Error: you cannot add a message which is already part of a folder to a new one. Please use moveTo or copyTo.β cast byaddMessage(). Like, the message already has a home π , don't try to give it a second one.moveToorcopyTo, bestie, pick one.
π SEE ALSO
This module is part of Mail-Box version 4.02, built on April 10, 2026.
Website: http://perl.overmeer.net/CPAN/
Go lurk, it's iconic π¦
π LICENSE
For contributors, see the file ChangeLog.
This software is copyright (c) 2001-2026 by Mark Overmeer.
This is free software; 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, bestie πβ¨ you just read Mail::Box::Net(3pm) from Mail-Box 4.02, built April 10, 2026, shipped with perl v5.40.1 and stamped 2026-05-09. go forth and handle your mail folders, you absolute legend ππ
π¦ 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