1Email::Sender::Role::CoUmsmeornSCeonndtirnigb(u3t)ed PerElmaDiolc:u:mSeenntdaetri:o:nRole::CommonSending(3)
2
3
4
6 Email::Sender::Role::CommonSending - the common sending tasks most
7 Email::Sender classes will need
8
10 version 2.600
11
13 Email::Sender::Role::CommonSending provides a number of features that
14 should ease writing new classes that perform the Email::Sender role.
15 Instead of writing a "send" method, implementors will need to write a
16 smaller "send_email" method, which will be passed an Email::Abstract
17 object and envelope containing "from" and "to" entries. The "to" entry
18 will be guaranteed to be an array reference.
19
20 A "success" method will also be provided as a shortcut for calling:
21
22 Email::Sender::Success->new(...);
23
24 A few other minor details are handled by CommonSending; for more
25 information, consult the source.
26
27 The methods documented here may be overridden to alter the behavior of
28 the CommonSending role.
29
31 This library should run on perls released even a long time ago. It
32 should work on any version of perl released in the last five years.
33
34 Although it may work on older versions of perl, no guarantee is made
35 that the minimum required version will not be increased. The version
36 may be increased for any reason, and there is no promise that patches
37 will be accepted to lower the minimum required perl.
38
40 prepare_email
41 This method is passed a scalar and is expected to return an
42 Email::Abstract object. You probably shouldn't override it in most
43 cases.
44
45 prepare_envelope
46 This method is passed a hashref and returns a new hashref that should
47 be used as the envelope passed to the "send_email" method. This method
48 is responsible for ensuring that the to entry is an array.
49
50 success
51 ...
52 return $self->success;
53
54 This method returns a new Email::Sender::Success object. Arguments
55 passed to this method are passed along to the Success's constructor.
56 This is provided as a convenience for returning success from
57 subclasses' "send_email" methods.
58
60 Ricardo Signes <cpan@semiotic.systems>
61
63 This software is copyright (c) 2022 by Ricardo Signes.
64
65 This is free software; you can redistribute it and/or modify it under
66 the same terms as the Perl 5 programming language system itself.
67
68
69
70perl v5.36.0 2023-01-E2m0ail::Sender::Role::CommonSending(3)