man > Mail::Message::Construct::Bounce

πŸ“› NAME

Mail::Message::Construct::Bounce β€” bounce a Mail::Message message to another destination

πŸš€ Quick Reference

Use CaseCommandDescription
πŸ“¨ Bounce a message to a recipient $message->bounce(To => 'you')->send; Send a copy of the message to the specified address, adding resent header fields.
πŸ“¨ Bounce with multiple recipients $message->bounce(To => 'you', Bcc => 'everyone')->send; Send to primary and blind‑carbon‑copy recipients.
πŸ“¨ Bounce with custom resent group $msg->bounce($rg)->send; Use a pre‑built Mail::Message::Head::ResentGroup object for fine‑grained header control.

πŸ“‹ SYNOPSIS

    $message->bounce(To => 'you')->send;

πŸ“ 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.

βš™οΈ METHODS

πŸ“¬ Constructing a message

$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.

When a message is received, the Mail Transfer Agent (MTA) adds a "Received" field to the header. As %options, you may specify lines which are added to the resent group of that received field. "Resent-*" is prepended before the field-names automatically, unless already present.

You may also specify an instantiated Mail::Message::Head::ResentGroup (RG) object. See Mail::Message::Head::ResentGroup::new() for the available options. This is required if you want to add a new resent group: create a new "Received" line in the header as well.

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 Mail::Message::body().

example:

            my $bounce = $folder->message(3)->bounce(To => 'you', Bcc => 'everyone');
            $bounce->send;
            $outbox->addMessage($bounce);

            my $rg     = Mail::Message::Head::ResentGroup->new(To => 'you',
               Received => 'from ... by ...');
            $msg->bounce($rg)->send;

πŸ” DIAGNOSTICS

Error: Method bounce requires To, Cc, or Bcc
The message bounce() method forwards a received message off to someone else without modification; you must specify its new destination. If you have the urge not to specify any destination, you probably are looking for reply(). When you wish to modify the content, use forward().

πŸ“š SEE ALSO

This module is part of Mail-Message distribution version 3.012, built on February 11, 2022. Website: http://perl.overmeer.net/CPAN/

πŸ“„ LICENSE

Copyrights 2001-2022 by [Mark Overmeer <markov AT cpan.org>]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/

Mail::Message::Construct::Bounce
πŸ“› NAME πŸš€ Quick Reference πŸ“‹ SYNOPSIS πŸ“ DESCRIPTION βš™οΈ METHODS
πŸ“¬ Constructing a message
πŸ” DIAGNOSTICS πŸ“š SEE ALSO πŸ“„ LICENSE

Generated by phpman v4.9.29 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-22 00:48 @2600:1f28:365:80b0:d8a5:c3c6:bf94:28c0
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format