1Email::Reply(3)       User Contributed Perl Documentation      Email::Reply(3)
2
3
4

NAME

6       Email::Reply - reply to an email message
7

VERSION

9       version 1.204
10

SYNOPSIS

12         use Email::Reply;
13
14         my $message = Email::Simple->new(join '', <>);
15         my $from    = (Email::Address->parse($message->header('From'))[0];
16
17         my $reply   = reply to   => $message,
18                             from => '"Casey West" <casey@geeknest.com>',
19                             all  => 1,
20                             body => <<__RESPONSE__;
21         Thanks for the message, I'll be glad to explain...
22         __RESPONSE__
23

DESCRIPTION

25       This software takes the hard out of generating replies to email
26       messages.
27

FUNCTIONS

29   reply
30         my $reply   = reply to       => $message,
31                             from     => '"Casey West" <casey@geeknest.com>',
32                             all      => 1;
33                             self     => 0,
34                             attach   => 1,
35                             quote    => 1,
36                             top_post => 0,
37                             keep_sig => 1,
38                             prefix   => ': ',
39                             attrib   => sprintf("From %s, typer of many words:",
40                                                 $from->name),
41                             body     => <<__RESPONSE__;
42         Thanks for the message, I'll be glad to explain the picture...
43         __RESPONSE__
44
45       This function accepts a number of named parameters and returns an email
46       message object of type "Email::MIME" or "Email::Simple", depending on
47       the parameters passed. Lets review those parameters now.
48
49       "to"
50           This required parameter is the email message you're replying to. It
51           can represent a number of object types, or a string containing the
52           message.  This value is passed directly to "Email::Abstract"
53           without passing go or collecting $200 so please, read up on its
54           available plugins for what is allowed here.
55
56       "from"
57           This optional parameter specifies an email address to use
58           indicating the sender of the reply message. It can be a string or
59           an "Email::Address" object. In the absence of this parameter, the
60           first address found in the original message's "To" header is used.
61           This may not always be what you want, so this parameter comes
62           highly recommended.
63
64       "all"
65           This optional parameter indicates weather or not you'd like to
66           "Reply to All."  If true, the reply's "Cc" header will be populated
67           with all the addresses in the original's "To" and "Cc" headers. By
68           default, the parameter is false, indicating "Reply to Sender."
69
70       "self"
71           This optional parameter decides weather or not an address matching
72           the "from" address will be included in the list of "all" addresses.
73           If true, your address will be preserved in that list if it is
74           found. If false, as it is by default, your address will be removed
75           from the list. As you might expect, this parameter is only useful
76           if "all" is true.
77
78       "attach"
79           This optional parameter allows for the original message, in its
80           entirety, to be encapsulated in a MIME part of type
81           "message/rfc822".  If true, the returned object from "reply" will
82           be a "Email::MIME" object whose second part is the encapsulated
83           message. If false, none of this happens.  By default, none of this
84           happens.
85
86       "quote"
87           This optional parameter, which is true by default, will quote the
88           original message for your reply. If the original message is a MIME
89           message, the first "text/plain" type part will be quoted. If it's a
90           Simple message, the body will be quoted. Well, that's only if you
91           keep the parameter true. If you don't, none of this occurs.
92
93       "top_post"
94           This optional parameter, whose use is generally discouraged, will
95           allow top posting when true. It will implicitly set "quote" to
96           true, and put your "body" before the quoted text. It is false by
97           default, and you should do your best to keep it that way.
98
99       "keep_sig"
100           This optional parameter toggles the signature stripping mechanism.
101           True by default, the original quoted body will have its signature
102           removed. When false, the signature is left in-tact and will be
103           quoted accordingly. This is only useful when "quote" is true.
104
105       "prefix"
106           This optional parameter specifies the quoting prefix. By default,
107           it's ">", but you can change it by setting this parameter. Again,
108           only useful when "quote" is true.
109
110       "attrib"
111           This optional parameter specifies the attribution line to add to
112           the beginning of quoted text. By default, the name or email address
113           of the original sender is used to replace %s in the string, "%s
114           wrote:".  You may change that with this parameter. No special
115           formats, "sprintf()" or otherwise, are provided for your
116           convenience. Sorry, you'll have to make due.  Like "prefix" and
117           "keep_sig", this is only good when "quote" is true.
118
119       "body"
120           This required parameter contains your prose, your manifesto, your
121           reply.  Remember to spell check!
122

SEE ALSO

124       Email::Abstract, Email::MIME, Email::MIME::Creator,
125       Email::Simple::Creator, Email::Address, perl.
126

AUTHOR

128       Casey West <casey@geeknest.com>
129

CONTRIBUTORS

131       •   David Steinbrunner <dsteinbrunner@pobox.com>
132
133       •   Ed Avis <eda@waniasset.com>
134
135       •   Ricardo Signes <rjbs@cpan.org>
136
138       This software is copyright (c) 2004 by Casey West.
139
140       This is free software; you can redistribute it and/or modify it under
141       the same terms as the Perl 5 programming language system itself.
142
143
144
145perl v5.34.0                      2022-01-21                   Email::Reply(3)
Impressum