.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Mail::Message::Construct::Bounce 3" .TH Mail::Message::Construct::Bounce 3 2024-01-06 "perl v5.38.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Mail::Message::Construct::Bounce \- bounce a Mail::Message .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& $message\->bounce(To => \*(Aqyou\*(Aq)\->send; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Complex functionality on Mail::Message objects is implemented in different files which are autoloaded. This file implements the functionality related to bouncing messages off to other destinations. .SH METHODS .IX Header "METHODS" .SS "Constructing a message" .IX Subsection "Constructing a message" .ie n .IP "$obj\->\fBbounce\fR( [<$rg_object|%options>] )" 4 .el .IP "\f(CW$obj\fR\->\fBbounce\fR( [<$rg_object|%options>] )" 4 .IX Item "$obj->bounce( [<$rg_object|%options>] )" The program calling this method considers itself as an intermediate step in the message delivery process; it therefore leaves a resent group of header fields as trace. .Sp When a message is received, the Mail Transfer Agent (MTA) adds a \&\f(CW\*(C`Received\*(C'\fR field to the header. As \f(CW%options\fR, you may specify lines which are added to the resent group of that received field. \f(CW\*(C`Resent\-*\*(C'\fR is prepended before the field-names automatically, unless already present. .Sp You may also specify an instantiated Mail::Message::Head::ResentGroup (RG) object. See \fBMail::Message::Head::ResentGroup::new()\fR for the available options. This is required if you want to add a new resent group: create a new \f(CW\*(C`Received\*(C'\fR line in the header as well. .Sp If you are planning to change the body of a bounce message, don't! Bounced messages have the same message-id as the original message, and therefore should have the same content (message-ids are universally unique). If you still insist, use \fBMail::Message::body()\fR. .Sp example: .Sp .Vb 1 \& my $bounce = $folder\->message(3)\->bounce(To => \*(Aqyou\*(Aq, Bcc => \*(Aqeveryone\*(Aq); \& \& $bounce\->send; \& $outbox\->addMessage($bounce); \& \& my $rg = Mail::Message::Head::ResentGroup\->new(To => \*(Aqyou\*(Aq, \& Received => \*(Aqfrom ... by ...\*(Aq); \& $msg\->bounce($rg)\->send; .Ve .SH DIAGNOSTICS .IX Header "DIAGNOSTICS" .IP "Error: Method bounce requires To, Cc, or Bcc" 4 .IX Item "Error: Method bounce requires To, Cc, or Bcc" The message \fBbounce()\fR method forwards a received message off to someone else without modification; you must specified it's new destination. If you have the urge not to specify any destination, you probably are looking for \fBreply()\fR. When you wish to modify the content, use \&\fBforward()\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of Mail-Message distribution version 3.015, built on December 11, 2023. Website: \fIhttp://perl.overmeer.net/CPAN/\fR .SH LICENSE .IX Header "LICENSE" Copyrights 2001\-2023 by [Mark Overmeer ]. For other contributors see ChangeLog. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See \fIhttp://dev.perl.org/licenses/\fR