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" in Mail::Message::Body
  • overload: '==' numerical comparison β€” Inherited, see "OVERLOADED" in Mail::Message::Body
  • overload: '@{}' addressed as array β€” Inherited, see "OVERLOADED" in Mail::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" in Mail::Message::Body
  • $class->new(%options) β€” Inherited, see "Constructors" in Mail::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" in Mail::Message::Body::Encode

🧚 Constructing a body 🧚

Extends "Constructing a body" in Mail::Message::Body.

  • $obj->attach(@messages, %options) β€” Inherited, see "Constructing a body" in Mail::Message::Body::Construct
  • $obj->charsetDetect(%options) β€” Inherited, see "Constructing a body" in Mail::Message::Body::Encode
  • $obj->check() β€” Inherited, see "Constructing a body" in Mail::Message::Body::Encode
  • $obj->concatenate(@components) β€” Inherited, see "Constructing a body" in Mail::Message::Body::Construct
  • $obj->decoded(%options) β€” Inherited, see "Constructing a body" in Mail::Message::Body
  • $obj->encode(%options) β€” Inherited, see "Constructing a body" in Mail::Message::Body::Encode
  • $obj->encoded(%options) β€” Inherited, see "Constructing a body" in Mail::Message::Body::Encode
  • $obj->eol( ['CR'|'LF'|'CRLF'|'NATIVE'] ) β€” Inherited, see "Constructing a body" in Mail::Message::Body::Encode
  • $obj->foreachLine(CODE) β€” Inherited, see "Constructing a body" in Mail::Message::Body::Construct
  • $obj->stripSignature(%options) β€” Inherited, see "Constructing a body" in Mail::Message::Body::Construct
  • $obj->unify($body) β€” Inherited, see "Constructing a body" in Mail::Message::Body::Encode

πŸ¦‹ The body πŸ¦‹

Extends "The body" in Mail::Message::Body.

  • $obj->isDelayed() β€” Inherited, see "The body" in Mail::Message::Body
  • $obj->isMultipart() β€” Inherited, see "The body" in Mail::Message::Body
  • $obj->isNested() β€” Inherited, see "The body" in Mail::Message::Body
  • $obj->message( [$message] ) β€” Inherited, see "The body" in Mail::Message::Body
  • $obj->partNumberOf($part) β€” Inherited, see "The body" in Mail::Message::Body

πŸ’… About the payload πŸ’…

Extends "About the payload" in Mail::Message::Body.

  • $obj->charset() β€” Inherited, see "About the payload" in Mail::Message::Body
  • $obj->checked( [BOOLEAN] ) β€” Inherited, see "About the payload" in Mail::Message::Body
  • $obj->contentId( [STRING|$field] ) β€” Inherited, see "About the payload" in Mail::Message::Body
  • $obj->description( [STRING|$field] ) β€” Inherited, see "About the payload" in Mail::Message::Body
  • $obj->disposition( [STRING|$field] ) β€” Inherited, see "About the payload" in Mail::Message::Body
  • $obj->dispositionFilename( [$directory] ) β€” Inherited, see "About the payload" in Mail::Message::Body::Encode
  • $obj->isBinary() β€” Inherited, see "About the payload" in Mail::Message::Body::Encode
  • $obj->isText() β€” Inherited, see "About the payload" in Mail::Message::Body::Encode
  • $obj->language( [@langs|\@langs|$langs|$field] ) β€” Inherited, see "About the payload" in Mail::Message::Body
  • $obj->mimeType() β€” Inherited, see "About the payload" in Mail::Message::Body
  • $obj->nrLines() β€” Inherited, see "About the payload" in Mail::Message::Body
  • $obj->size() β€” Inherited, see "About the payload" in Mail::Message::Body
  • $obj->transferEncoding( [STRING|$field] ) β€” Inherited, see "About the payload" in Mail::Message::Body
  • $obj->type( [STRING|$field] ) β€” Inherited, see "About the payload" in Mail::Message::Body

πŸ“ Access to the payload πŸ“

Extends "Access to the payload" in Mail::Message::Body.

  • $obj->endsOnNewline() β€” Inherited, see "Access to the payload" in Mail::Message::Body
  • $obj->file() β€” Inherited, see "Access to the payload" in Mail::Message::Body
  • $obj->lines() β€” Inherited, see "Access to the payload" in Mail::Message::Body
  • $obj->print() β€” Inherited, see "Access to the payload" in Mail::Message::Body
  • $obj->printEscapedFrom($fh) β€” Inherited, see "Access to the payload" in Mail::Message::Body
  • $obj->string() β€” Inherited, see "Access to the payload" in Mail::Message::Body
  • $obj->stripTrailingNewline() β€” Inherited, see "Access to the payload" in Mail::Message::Body
  • $obj->write(%options) β€” Inherited, see "Access to the payload" in Mail::Message::Body

🧠 Internals 🧠

Extends "Internals" in Mail::Message::Body.

  • $any->addTransferEncHandler( $name, <$class|$object> ) β€” Inherited, see "Internals" in Mail::Message::Body::Encode
  • $obj->contentInfoFrom($head) β€” Inherited, see "Internals" in Mail::Message::Body
  • $obj->contentInfoTo($head) β€” Inherited, see "Internals" in Mail::Message::Body
  • $obj->fileLocation( [$begin, $end] ) β€” Inherited, see "Internals" in Mail::Message::Body
  • $obj->getTransferEncHandler($type) β€” Inherited, see "Internals" in Mail::Message::Body::Encode
  • $obj->isModified() β€” Inherited, see "Internals" in Mail::Message::Body
  • $obj->load() β€” Inherited, see "Internals" in Mail::Message::Body
  • $obj->modified( [BOOLEAN] ) β€” Inherited, see "Internals" in Mail::Message::Body
  • $obj->moveLocation( [$distance] ) β€” Inherited, see "Internals" in Mail::Message::Body
  • $obj->read() β€” Inherited, see "Internals" in Mail::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" in Mail::Message::Body
  • $obj->notImplemented() β€” Inherited, see "Error handling" in Mail::Reporter
  • $obj->notImplemented() β€” Inherited, see "Error handling" in Mail::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" in Mail::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 by encode()
  • Error: cannot concatenate element $which β€” Cast by concatenate()
  • Fault: cannot open $file to write body: $! β€” Cast by write()
  • Fault: cannot read from file $name: $! β€” Cast by nrLines()
  • Fault: cannot read from file $name: $! β€” Cast by string()
  • Fault: cannot read from file $name: $! β€” Cast by print()
  • Fault: cannot read from file $name: $! β€” Cast by endsOnNewline()
  • Fault: cannot read from file $name: $! β€” Cast by lines()
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 by new()
  • Fault: cannot write to file $name: $! β€” Cast by read()
  • 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 by new()
  • Fault: cannot write to temporary body file $name: $! β€” Cast by new()
  • Warning: charset '$name' is not known. β€” The encoding or decoding of a message body encounters a character set which is not understood by Perl's Encode module. Cast by encode()
  • 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 by notImplemented()
  • 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 by notImplemented()
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 by write()
  • 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 by encode()
  • 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 by encode()
  • Error: no filename parameter for write() body. β€” Cast by write()
  • Error: part number needs multi-part or nested. β€” Cast by partNumberOf()
  • Fault: unable to read file $name for message body file: $! β€” A Mail::Message::Body::File object 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 by new()
  • Error: unknown line terminator '$eol'. β€” Cast by eol()

πŸ‘€ 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