{
    "mode": "perldoc",
    "parameter": "Mail::Message::Construct::Bounce",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AMessage%3A%3AConstruct%3A%3ABounce/json",
    "generated": "2026-06-11T06:16:43Z",
    "synopsis": "$message->bounce(To => 'you')->send;",
    "sections": {
        "NAME": {
            "content": "Mail::Message::Construct::Bounce - bounce a Mail::Message\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "$message->bounce(To => 'you')->send;\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Complex functionality on Mail::Message objects is implemented in different files which are\nautoloaded. This file implements the functionality related to bouncing messages off to other\ndestinations.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "",
            "subsections": [
                {
                    "name": "Constructing a message",
                    "content": "$obj->bounce( [<$rgobject|%options>] )\nThe program calling this method considers itself as an intermediate step in the message\ndelivery process; it therefore leaves a resent group of header fields as trace.\n\nWhen a message is received, the Mail Transfer Agent (MTA) adds a \"Received\" field to the\nheader. As %options, you may specify lines which are added to the resent group of that\nreceived field. \"Resent-*\" is prepended before the field-names automatically, unless already\npresent.\n\nYou may also specify an instantiated Mail::Message::Head::ResentGroup (RG) object. See\nMail::Message::Head::ResentGroup::new() for the available options. This is required if you\nwant to add a new resent group: create a new \"Received\" line in the header as well.\n\nIf you are planning to change the body of a bounce message, don't! Bounced messages have the\nsame message-id as the original message, and therefore should have the same content\n(message-ids are universally unique). If you still insist, use Mail::Message::body().\n\nexample:\n\nmy $bounce = $folder->message(3)->bounce(To => 'you', Bcc => 'everyone');\n\n$bounce->send;\n$outbox->addMessage($bounce);\n\nmy $rg     = Mail::Message::Head::ResentGroup->new(To => 'you',\nReceived => 'from ... by ...');\n$msg->bounce($rg)->send;\n"
                }
            ]
        },
        "DIAGNOSTICS": {
            "content": "Error: Method bounce requires To, Cc, or Bcc\nThe message bounce() method forwards a received message off to someone else without\nmodification; you must specified it's new destination. If you have the urge not to specify\nany destination, you probably are looking for reply(). When you wish to modify the content,\nuse forward().\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "This module is part of Mail-Message distribution version 3.012, built on February 11, 2022.\nWebsite: http://perl.overmeer.net/CPAN/\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "Copyrights 2001-2022 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself. See http://dev.perl.org/licenses/\n",
            "subsections": []
        }
    },
    "summary": "Mail::Message::Construct::Bounce - bounce a Mail::Message",
    "flags": [],
    "examples": [],
    "see_also": []
}