Mail::M...nternet(3)

✨ NAME ✨

Mail::M...nternet β€” bestie, this is the little translator module that takes your Mail::Message and turns it into a Mail::Internet, and back again. vv cute, vv useful. πŸ¦‹


🌈 INHERITANCE 🌸

okay so the family tree goes like this:

Mail::Message::Convert::MailInternet
  is a Mail::Message::Convert
  is a Mail::Reporter

like, it's giving nepo baby but make it useful πŸ’…


✨ SYNOPSIS ✨

here's the vibe in code, no cap:

use Mail::Message::Convert::MailInternet;
my $convert = Mail::Message::Convert::MailInternet->new;

my Mail::Message  $msg    = Mail::Message->new;
my Mail::Internet $intern = $convert->export($msg);

my Mail::Internet $intern = Mail::Internet->new;
my Mail::Message  $msg    = $convert->from($intern);

use Mail::Box::Manager;
my $mgr     = Mail::Box::Manager->new;
my $folder  = $mgr->open(folder => 'Outbox');
$folder->addMessage($intern);

look at you go, converting both directions like it's nothing πŸŽ€


πŸ’– DESCRIPTION πŸ’–

So the tea is: the Mail::Internet class of messages is super popular for all kinds of message applications written in Perl. Everyone loves it. It's iconic. 🫢

BUT. Here's the thing bestie β€” that format was developed back when e-mail messages were still small and attachments were rare. Like, ancient times. Meanwhile Mail::Message is much more flexible in this respect. So if you've got a big messy modern message and you need it in Mail::Internet shape (or the other way around), that's literally this module's whole job.

Extends "DESCRIPTION" in Mail::Message::Convert.


πŸ› οΈ METHODS πŸ› οΈ

Extends "METHODS" in Mail::Message::Convert.

🌟 Constructors

Extends "Constructors" in Mail::Message::Convert.

  • $class->new(%options) β€” Inherited, see "METHODS" in Mail::Message::Convert

🌟 Attributes

Extends "Attributes" in Mail::Message::Convert.

(yes bestie, this section is short, that's just how it is, no notes) πŸ’€

🌟 Converting

Extends "Converting" in Mail::Message::Convert.

  • $obj->export($message, %options) β€” Returns a new message object built from the info inside a Mail::Message object. The $message you hand over is an instance of a Mail::Message.

Β» example:

my $convert = Mail::Message::Convert::MailInternet->new;
my Mail::Message  $msg   = Mail::Message->new;
my Mail::Internet $copy  = $convert->export($msg);
  • $obj->from($object, %options) β€” Returns a new Mail::Message object built from the info inside a Mail::Internet object. the other direction, slay πŸ”₯

Β» example:

my $convert = Mail::Message::Convert::MailInternet->new;
my Mail::Internet $msg  = Mail::Internet->new;
my Mail::Message  $copy = $convert->from($msg);
  • $obj->selectedFields($head) β€” Inherited, see "Converting" in Mail::Message::Convert

🌟 Error handling

Extends "Error handling" in Mail::Message::Convert.

  • $obj->AUTOLOAD() β€” Inherited, see "Error handling" in Mail::Reporter
  • $obj->notImplemented() β€” Inherited, see "Error handling" in Mail::Reporter

🌟 Cleanup

Extends "Cleanup" in Mail::Message::Convert.

  • $obj->DESTROY() β€” Inherited, see "Cleanup" in Mail::Reporter

🚨 DIAGNOSTICS 🚨

okay bestie, here's where things can go sideways. read carefully πŸ‘‘

  • 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: converting from Mail::Internet but got a $what. β€” Cast by from()
  • Error: export message must be a Mail::Message object, but is $what. β€” Cast by export()
ngl if you're seeing these, something's wrong with what you passed in. not your fault, we've all been there 😭

πŸ‘€ 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 a wrap bestie!! πŸ’œ this page came from perl v5.42.0, dated 2026-02-05, and its header name is Mail::M...nternet(3) β€” iconic behavior, periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from