Mail::M...ilSimple(3)

πŸ’Œ NAME

Mail::Message::Convert::EmailSimple β€” bestie, this lil icon translates a Mail::Message into an Email::Simple, and back again. That's it. That's the whole job. ✨

Oh and also, hi, you're reading Mail::M...ilSimple(3) from the User Contributed Perl Documentation section, in case the vibe check needed context 🫢


🧬 INHERITANCE

Mail::Message::Convert::EmailSimple
  is a Mail::Message::Convert
  is a Mail::Reporter

so it's giving... a whole family tree, and it inherited the good genes πŸ’…


✨ SYNOPSIS

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

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

my Email::Simple $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);

okay look at her go 😭 she's converting both directions AND sliding straight into a folder. main character behavior fr fr πŸ‘‘


🌸 DESCRIPTION

So Email::Simple is literally one of the base objects that the whole giant Email* module squad is built on, and that squad handles a ton of e-mail needs that MailBox also supports. So this class is your lil bridge πŸŽ€ β€” you use it to gradually migrate from an Email*-based setup over into a MailBox implementation. No dramatic rewrite, just vibes and a smooth transition bestie.

⚠️ Real talk though: the internals of this class are far from optimal. The conversion does work (shoutout to Ricardo Signes for that πŸ™Œ), but it is expensive in time and memory usage. It could easily be optimized. So like... it works, but she's not efficient, and that's just the truth πŸ’€

Also, this section 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. Nothing new here, she's just doing what her parent class does πŸ’–

πŸŽ€ Attributes

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

πŸ”„ Converting

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

  • $obj->export($message, %options) β€” hands you back a brand new Email::Simple object, built from the info inside a Mail::Message object. The $message you pass in is an instance of a Mail::Message. ✨

Β» example:

my $convert = Mail::Message::Convert::EmailSimple->new;
my Mail::Message  $msg   = Mail::Message->new;
my Mail::Internet $copy  = $convert->export($msg);
  • $obj->from($object, %options) β€” the other direction, bestie πŸ” returns a brand new Mail::Message object built from the info inside an Email::Simple.

Β» example:

my $convert = Mail::Message::Convert::EmailSimple->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

  • 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, but 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 Email::Simple but got a $class.

Cast by from(). 🫠

  • Error: export message must be a Mail::Message, but is a $class.

Cast by export(). 🫠


πŸ‘€ 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. periodt πŸ’…


okay that's the whole page bestie, you ate that read 🫢 this was rendered by perl v5.42.0 and stamped 2026-02-05, and yes we're back at the top of the manual again because that's just how manpages do β€” no cap, iconic behavior 🌟

πŸ“¦ where this page comes from