Email::Reply(3)

πŸ’Œ Email::Reply(3) β€” reply to an email message, but make it main character πŸ’Œ

okay so this is the Email::Reply(3) page, straight from the User Contributed Perl Documentation section. it's a manual page about replying to email messages, and it is lowkey iconic.

🌸 NAME 🌸

Email::Reply β€” reply to an email message. that's the whole name section, and honestly it's giving exactly what it says on the tin. ✨ periodt ✨

🌸 VERSION 🌸

version 1.204 πŸ’… yes bestie, that's the version.

✨ SYNOPSIS ✨

okay bestie, here's the vibe in code form. copy these exactly, because we do not editorialize the synopsis:

         use Email::Reply;

         my $message = Email::Simple->new(join '', <>);
         my $from    = (Email::Address->parse($message->header('From'))[0];

         my $reply   = reply to   => $message,
                             from => '"Casey West" <casey@geeknest.com>',
                             all  => 1,
                             body => <<__RESPONSE__;
         Thanks for the message, I'll be glad to explain...
         __RESPONSE__

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this software takes the hard out of generating replies to email messages. literally. no cap. it's giving "reply object served fresh" and we love that for us. πŸ¦‹

πŸŽ€ FUNCTIONS πŸŽ€

πŸ’… reply πŸ’…

         my $reply   = reply to       => $message,
                             from     => '"Casey West" <casey@geeknest.com>',
                             all      => 1;
                             self     => 0,
                             attach   => 1,
                             quote    => 1,
                             top_post => 0,
                             keep_sig => 1,
                             prefix   => ': ',
                             attrib   => sprintf("From %s, typer of many words:",
                                                 $from->name),
                             body     => <<__RESPONSE__;
         Thanks for the message, I'll be glad to explain the picture...
         __RESPONSE__

this function accepts a number of named parameters and returns an email message object of type Email::MIME or Email::Simple, depending on the parameters passed. let's review those parameters now, bestie. 🫢

  • to β€” required, bestie. this is the email message you're replying to. it can represent a number of object types, or a string containing the message. this value is passed directly to Email::Abstract without passing go or collecting $200, so please read up on its available plugins for what is allowed here. πŸ™ˆ
  • from β€” optional. this specifies an email address to use indicating the sender of the reply message. it can be a string or an Email::Address object. in the absence of this parameter, the first address found in the original message's To header is used. this may not always be what you want, so this parameter comes highly recommended. πŸ’–
  • all β€” optional. this indicates whether or not you'd like to "Reply to All." if true, the reply's Cc header will be populated with all the addresses in the original's To and Cc headers. by default, the parameter is false, indicating "Reply to Sender." πŸ‘‘
  • self β€” optional. this decides whether or not an address matching the from address will be included in the list of all addresses. if true, your address will be preserved in that list if it is found. if false, as it is by default, your address will be removed from the list. as you might expect, this parameter is only useful if all is true. 🫢
  • attach β€” optional. this allows for the original message, in its entirety, to be encapsulated in a MIME part of type message/rfc822. if true, the returned object from reply will be a Email::MIME object whose second part is the encapsulated message. if false, none of this happens. by default, none of this happens. πŸŽ€
  • quote β€” optional, true by default. this will quote the original message for your reply. if the original message is a MIME message, the first text/plain type part will be quoted. if it's a Simple message, the body will be quoted. well, that's only if you keep the parameter true. if you don't, none of this occurs. ✨
  • top_post β€” optional, and its use is generally discouraged. this will allow top posting when true. it will implicitly set quote to true, and put your body before the quoted text. it is false by default, and you should do your best to keep it that way. πŸ’€
  • keep_sig β€” optional. this toggles the signature stripping mechanism. true by default, the original quoted body will have its signature removed. when false, the signature is left in-tact and will be quoted accordingly. this is only useful when quote is true. 🧚
  • prefix β€” optional. this specifies the quoting prefix. by default, it's >, but you can change it by setting this parameter. again, only useful when quote is true. πŸ’…
  • attrib β€” optional. this specifies the attribution line to add to the beginning of quoted text. by default, the name or email address of the original sender is used to replace %s in the string, "%s wrote:". you may change that with this parameter. no special formats, sprintf() or otherwise, are provided for your convenience. sorry, you'll have to make due. like prefix and keep_sig, this is only good when quote is true. 😭
  • body β€” required. this contains your prose, your manifesto, your reply. remember to spell check! πŸ“

🌈 SEE ALSO 🌈

the whole squad is Email::Abstract, Email::MIME, Email::MIME::Creator, Email::Simple::Creator, Email::Address, and perl. 🌈

πŸ‘‘ AUTHOR πŸ‘‘

Casey West <casey@geeknest.com> πŸ‘‘

🫢 CONTRIBUTORS 🫢

  • David Steinbrunner <dsteinbrunner@pobox.com>
  • Ed Avis <eda@waniasset.com>
  • Ricardo Signes <rjbs@cpan.org>

this software is copyright (c) 2004 by Casey West. πŸ’œ

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. πŸ’–


okay that's the whole page, bestie! Email::Reply version 1.204, footer source/version perl v5.42.0, date 2015-12-02. slay and happy replying! πŸ’–

πŸ“¦ where this page comes from