Mail::M...dy::File(3)
okay so bestie, welcome to Mail::Message::Body::File(3) from the User Contributed Perl Documentation π this is the part where message bodies get a whole file to themselves, and honestly? main character energy.
β¨ NAME β¨
Mail::Message::Body::File β body of a message temporarily stored in a file. periodt π
𧬠INHERITANCE π§¬
Mail::Message::Body::File
is a Mail::Message::Body
is a Mail::Reporter
Mail::Message::Body also extends Mail::Reporter
is a Mail::Reporter
π SYNOPSIS π
See Mail::Message::Body
π DESCRIPTION π
okay so the body (content) of a message can be stored in various ways. this doc is all about the extra functionality you get when a message is stored in a file. storing a whole message is a file is useful when the body is large. although access through a file is slower, it is saving a lot of memory. no cap.
Extends "DESCRIPTION" in Mail::Message::Body.
π₯ OVERLOADED π₯
Extends "OVERLOADED" in Mail::Message::Body.
- overload:
'""'stringification β Inherited, see "OVERLOADED" inMail::Message::Body - overload:
'=='numerical comparison β Inherited, see "OVERLOADED" inMail::Message::Body - overload:
'@{}'addressed as array β Inherited, see "OVERLOADED" inMail::Message::Body - overload: bool true/false β Inherited, see "OVERLOADED" in
Mail::Message::Body
π οΈ METHODS π οΈ
Extends "METHODS" in Mail::Message::Body.
ποΈ Constructors ποΈ
Extends "Constructors" in Mail::Message::Body.
$obj->clone()β Inherited, see "Constructors" inMail::Message::Body$class->new(%options)β Inherited, see "Constructors" inMail::Message::Body
the option menu is serving:
-Option --Defined in --Default
based_on Mail::Message::Body undef
charset Mail::Message::Body 'PERL'
checked Mail::Message::Body false
content_id Mail::Message::Body undef
data Mail::Message::Body undef
description Mail::Message::Body undef
disposition Mail::Message::Body undef
eol Mail::Message::Body 'NATIVE'
file Mail::Message::Body undef
filename Mail::Message::Body undef
language Mail::Message::Body undef
message Mail::Message::Body undef
mime_type Mail::Message::Body 'text/plain'
modified Mail::Message::Body false
transfer_encoding Mail::Message::Body 'none'
and the option shapes, exactly as they come:
based_on => $bodyβ yep, that's the shape.charset => $charset|'PERL'|<undef>β yep, that's the shape.checked => BOOLEANβ yep, that's the shape.content_id => STRINGβ yep, that's the shape.data => \@lines|$textβ yep, that's the shape.description => STRING|$fieldβ yep, that's the shape.disposition => STRING|$fieldβ yep, that's the shape.eol => 'CR'|'LF'|'CRLF'|'NATIVE'β yep, that's the shape.file => $file|$handle|$ioβ yep, that's the shape.filename => $fileβ yep, that's the shape.language => STRING|\@lang|$fieldβ yep, that's the shape.message => $messageβ yep, that's the shape.mime_type => STRING|$field|$mimeβ yep, that's the shape.modified => BOOLEANβ yep, that's the shape.transfer_encoding => STRING|$fieldβ yep, that's the shape.
πΈ Attributes πΈ
Extends "Attributes" in Mail::Message::Body.
$obj->charsetDetectAlgorithm( [CODE|undef|METHOD] )β Inherited, see "Attributes" inMail::Message::Body::Encode
π§ Constructing a body π§
Extends "Constructing a body" in Mail::Message::Body.
$obj->attach(@messages, %options)β Inherited, see "Constructing a body" inMail::Message::Body::Construct$obj->charsetDetect(%options)β Inherited, see "Constructing a body" inMail::Message::Body::Encode$obj->check()β Inherited, see "Constructing a body" inMail::Message::Body::Encode$obj->concatenate(@components)β Inherited, see "Constructing a body" inMail::Message::Body::Construct$obj->decoded(%options)β Inherited, see "Constructing a body" inMail::Message::Body$obj->encode(%options)β Inherited, see "Constructing a body" inMail::Message::Body::Encode$obj->encoded(%options)β Inherited, see "Constructing a body" inMail::Message::Body::Encode$obj->eol( ['CR'|'LF'|'CRLF'|'NATIVE'] )β Inherited, see "Constructing a body" inMail::Message::Body::Encode$obj->foreachLine(CODE)β Inherited, see "Constructing a body" inMail::Message::Body::Construct$obj->stripSignature(%options)β Inherited, see "Constructing a body" inMail::Message::Body::Construct$obj->unify($body)β Inherited, see "Constructing a body" inMail::Message::Body::Encode
π¦ The body π¦
Extends "The body" in Mail::Message::Body.
$obj->isDelayed()β Inherited, see "The body" inMail::Message::Body$obj->isMultipart()β Inherited, see "The body" inMail::Message::Body$obj->isNested()β Inherited, see "The body" inMail::Message::Body$obj->message( [$message] )β Inherited, see "The body" inMail::Message::Body$obj->partNumberOf($part)β Inherited, see "The body" inMail::Message::Body
π About the payload π
Extends "About the payload" in Mail::Message::Body.
$obj->charset()β Inherited, see "About the payload" inMail::Message::Body$obj->checked( [BOOLEAN] )β Inherited, see "About the payload" inMail::Message::Body$obj->contentId( [STRING|$field] )β Inherited, see "About the payload" inMail::Message::Body$obj->description( [STRING|$field] )β Inherited, see "About the payload" inMail::Message::Body$obj->disposition( [STRING|$field] )β Inherited, see "About the payload" inMail::Message::Body$obj->dispositionFilename( [$directory] )β Inherited, see "About the payload" inMail::Message::Body::Encode$obj->isBinary()β Inherited, see "About the payload" inMail::Message::Body::Encode$obj->isText()β Inherited, see "About the payload" inMail::Message::Body::Encode$obj->language( [@langs|\@langs|$langs|$field] )β Inherited, see "About the payload" inMail::Message::Body$obj->mimeType()β Inherited, see "About the payload" inMail::Message::Body$obj->nrLines()β Inherited, see "About the payload" inMail::Message::Body$obj->size()β Inherited, see "About the payload" inMail::Message::Body$obj->transferEncoding( [STRING|$field] )β Inherited, see "About the payload" inMail::Message::Body$obj->type( [STRING|$field] )β Inherited, see "About the payload" inMail::Message::Body
π Access to the payload π
Extends "Access to the payload" in Mail::Message::Body.
$obj->endsOnNewline()β Inherited, see "Access to the payload" inMail::Message::Body$obj->file()β Inherited, see "Access to the payload" inMail::Message::Body$obj->lines()β Inherited, see "Access to the payload" inMail::Message::Body$obj->print()β Inherited, see "Access to the payload" inMail::Message::Body$obj->printEscapedFrom($fh)β Inherited, see "Access to the payload" inMail::Message::Body$obj->string()β Inherited, see "Access to the payload" inMail::Message::Body$obj->stripTrailingNewline()β Inherited, see "Access to the payload" inMail::Message::Body$obj->write(%options)β Inherited, see "Access to the payload" inMail::Message::Body
π§ Internals π§
Extends "Internals" in Mail::Message::Body.
$any->addTransferEncHandler( $name, <$class|$object> )β Inherited, see "Internals" inMail::Message::Body::Encode$obj->contentInfoFrom($head)β Inherited, see "Internals" inMail::Message::Body$obj->contentInfoTo($head)β Inherited, see "Internals" inMail::Message::Body$obj->fileLocation( [$begin, $end] )β Inherited, see "Internals" inMail::Message::Body$obj->getTransferEncHandler($type)β Inherited, see "Internals" inMail::Message::Body::Encode$obj->isModified()β Inherited, see "Internals" inMail::Message::Body$obj->load()β Inherited, see "Internals" inMail::Message::Body$obj->modified( [BOOLEAN] )β Inherited, see "Internals" inMail::Message::Body$obj->moveLocation( [$distance] )β Inherited, see "Internals" inMail::Message::Body$obj->read()β Inherited, see "Internals" inMail::Message::Body$obj->tempFilename( [$filename] )β Returns the name of the temporary file which is used to store this body.
π Error handling π
Extends "Error handling" in Mail::Message::Body.
$obj->AUTOLOAD()β Inherited, see "Error handling" inMail::Message::Body$obj->notImplemented()β Inherited, see "Error handling" inMail::Reporter$obj->notImplemented()β Inherited, see "Error handling" inMail::Reporter
yes bestie, notImplemented() is listed twice. the original said it twice, so we keep it twice. periodt.
π§Ό Cleanup π§Ό
Extends "Cleanup" in Mail::Message::Body.
$obj->DESTROY()β The temporary file is automatically removed when the body is not required anymore. Improves base, see "Cleanup" inMail::Reporter
π DETAILS π
Extends "DETAILS" in Mail::Message::Body.
π DIAGNOSTICS π
okay bestie, here's the whole drama list of messages this thing can throw at you. Every single one, no skips, because the way I would never leave you hanging mid-error. π«Ά
Warning: Content-Transfer-Encoding '$te' requires explicit charset, defaulted to utf-8.β Cast byencode()Error: cannot concatenate element $whichβ Cast byconcatenate()Fault: cannot open $file to write body: $!β Cast bywrite()Fault: cannot read from file $name: $!β Cast bynrLines()Fault: cannot read from file $name: $!β Cast bystring()Fault: cannot read from file $name: $!β Cast byprint()Fault: cannot read from file $name: $!β Cast byendsOnNewline()Fault: cannot read from file $name: $!β Cast bylines()
yes queen, that same message shows up five whole times with different Cast by lines. it's giving "reused outfit but make it fashion". still listing all of them. periodt. π
Fault: cannot write body to file $name: $!β Cast bynew()Fault: cannot write to file $name: $!β Cast byread()Fault: cannot write to temporary body file $name: $!β The message body is to be stored in a temporary file (probably because it is a large body), but for the indicated reason, this file cannot be created. Cast bynew()Fault: cannot write to temporary body file $name: $!β Cast bynew()Warning: charset '$name' is not known.β The encoding or decoding of a message body encounters a character set which is not understood by Perl'sEncodemodule. Cast byencode()Error: class $package does not implement method $method.β Fatal error: the specific$package(or one of its superclasses) does not implement this method where it should. This message means that some other related classes do implement this method however the class at hand does not. Probably you should investigate this and probably inform the author of the package. Cast bynotImplemented()Error: class $package does not implement method $method.β Fatal error: the specific$package(or one of its superclasses) does not implement this method where it should. This message means that some other related classes do implement this method however the class at hand does not. Probably you should investigate this and probably inform the author of the package. Cast bynotImplemented()
twin. identical. same energy. yes it's in here twice, and yes I'm keeping it twice because the facts don't change just because it's lowkey redundant. π¦
Fault: error closing $file after write body: $!β Cast bywrite()Warning: no decoder defined for transfer encoding '$encoding'.β The data (message body) is encoded in a way which is not currently understood, therefore no decoding (or recoding) can take place. Cast byencode()Warning: no encoder defined for transfer encoding '$encoding'.β The data (message body) has been decoded, but the required encoding is unknown. The decoded data is returned. Cast byencode()Error: no filename parameter for write() body.β Cast bywrite()Error: part number needs multi-part or nested.β Cast bypartNumberOf()Fault: unable to read file $name for message body file: $!β AMail::Message::Body::Fileobject is to be created from a named file, but it is impossible to read that file to retrieve the lines within. Therefore, no copy to a temporary file can be made. Cast bynew()Error: unknown line terminator '$eol'.β Cast byeol()
π SEE ALSO π
This module is part of Mail-Message version 4.04, built on February 04, 2026. Website: http://perl.overmeer.net/CPAN/
π LICENSE π
For contributors see 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 the whole page bestie, you made it to the end, iconic behavior honestly β¨ this was pulled from the manpage rendered by perl v5.42.0, dated 2026-02-05, filed under Mail::M...dy::File(3) β go forth and read your message bodies, you absolute legend ππ
π¦ where this page comes from
- fedora 44: perl-Mail-Message 4.04-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms