1Mail::Message::ConstrucUts:e:rBoCuonncter(i3b)uted PerlMDaoiclu:m:eMnetsastaigoen::Construct::Bounce(3)
2
3
4
6 Mail::Message::Construct::Bounce - bounce a Mail::Message
7
9 $message->bounce(To => 'you')->send;
10
12 Complex functionality on Mail::Message objects is implemented in
13 different files which are autoloaded. This file implements the
14 functionality related to bouncing messages off to other destinations.
15
17 Constructing a message
18 $obj->bounce([RG-OBJECT|OPTIONS])
19 The program calling this method considers itself as an intermediate
20 step in the message delivery process; it therefore leaves a resent
21 group of header fields as trace.
22
23 When a message is received, the Mail Transfer Agent (MTA) adds a
24 "Received" field to the header. As OPTIONS, you may specify lines
25 which are added to the resent group of that received field.
26 "Resent-*" is prepended before the field-names automatically,
27 unless already present.
28
29 You may also specify an instantiated
30 Mail::Message::Head::ResentGroup (RG) object. See
31 Mail::Message::Head::ResentGroup::new() for the available options.
32 This is required if you want to add a new resent group: create a
33 new "Received" line in the header as well.
34
35 If you are planning to change the body of a bounce message, don't!
36 Bounced messages have the same message-id as the original message,
37 and therefore should have the same content (message-ids are
38 universally unique). If you still insist, use
39 Mail::Message::body().
40
41 example:
42
43 my $bounce = $folder->message(3)->bounce(To => 'you', Bcc => 'everyone');
44
45 $bounce->send;
46 $outbox->addMessage($bounce);
47
48 my $rg = Mail::Message::Head::ResentGroup->new(To => 'you',
49 Received => 'from ... by ...');
50 $msg->bounce($rg)->send;
51
53 Error: Method bounce requires To, Cc, or Bcc
54 The message bounce() method forwards a received message off to
55 someone else without modification; you must specified it's new
56 destination. If you have the urge not to specify any destination,
57 you probably are looking for reply(). When you wish to modify the
58 content, use forward().
59
61 This module is part of Mail-Box distribution version 2.097, built on
62 January 26, 2011. Website: http://perl.overmeer.net/mailbox/
63
65 Copyrights 2001-2011 by Mark Overmeer. For other contributors see
66 ChangeLog.
67
68 This program is free software; you can redistribute it and/or modify it
69 under the same terms as Perl itself. See
70 http://www.perl.com/perl/misc/Artistic.html
71
72
73
74perl v5.12.3 2011-01-26Mail::Message::Construct::Bounce(3)