{
    "mode": "info",
    "parameter": "Mail::Message::Construct::Reply",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/Mail%3A%3AMessage%3A%3AConstruct%3A%3AReply/json",
    "generated": "2026-07-05T09:31:47Z",
    "synopsis": "my Mail::Message $reply = $message->reply;\nmy $quoted  = $message->replyPrelude($head->get('From'));",
    "sections": {
        "Mail::Message::ConstruUserRContributed PerMail::Message::Construct::Reply(3pm)": {
            "content": "",
            "subsections": []
        },
        "NAME": {
            "content": "Mail::Message::Construct::Reply - reply to a Mail::Message\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "my Mail::Message $reply = $message->reply;\nmy $quoted  = $message->replyPrelude($head->get('From'));\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Complex functionality on Mail::Message objects is implemented in\ndifferent files which are autoloaded.  This file implements the\nfunctionality related to creating message replies.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "Constructing a message\n$obj->reply(%options)\nStart a reply to this message. Some of the header-lines of the\noriginal message will be taken. A message-id will be assigned. Some\nheader lines will be updated to facilitate message-thread detection\n(see Mail::Box::Thread::Manager).\n\nYou may reply to a whole message or a message part.  You may wish\nto overrule some of the default header settings for the reply\nimmediately, or you may do that later with \"set\" on the header.\n\nADDRESSES may be specified as string, or a Mail::Address object, or\nas array of Mail::Address objects.\n\nAll %options which are not listed below AND start with a capital,\nwill be added as additional headers to the reply message.\n\n-Option         --Default\nBcc              undef\nCc               <'cc' in current>\nFrom             <'to' in current>\nMessage-ID       <uniquely generated>\nSubject          replySubject()\nTo               <sender in current>\nbody             undef\ngroupreply      <true>\ninclude          'INLINE'\nmaxsignature    10\nmessagetype     Mail::Message\npostlude         undef\nprelude          undef\nquote            '> '\nsignature        undef\nstripsignature  qr/^--\\s/\n\nBcc => ADDRESSES\nReceivers of blind carbon copies: their names will not be\npublished to other message receivers.\n\nCc => ADDRESSES\nThe carbon-copy receivers, by default a copy of the \"Cc\" field of\nthe source message.\n\nFrom => ADDRESSES\nYour identification, by default taken from the \"To\" field of the\nsource message.\n\nMessage-ID => STRING\nSupply a STRING as specific message-id for the reply.  By\ndefault, one is generated for you.  If there are no angles around\nyour id, they will be added.\n\nSubject => STRING|CODE\nForce the subject line to the specific STRING, or the result of\nthe subroutine specified by CODE.  The subroutine will be called\npassing the subject of the original message as only argument.  By\ndefault, Mail::Message::replySubject() is used.\n\nTo => ADDRESSES\nThe destination of your message.  By default taken from the\n\"Reply-To\" field in the source message.  If that field is not\npresent as well, the \"From\" line is scanned.  If they all fail,\n\"undef\" is returned by this method: no reply message produced.\n\nbody => BODY\nUsually, the reply method can create a nice, sufficient message\nfrom the source message's body.  In case you like more\ncomplicated reformatting, you may also create a body yourself\nfirst, and pass this on to this \"reply\" method. Some of the other\noptions to this method will be ignored in this case.\n\ngroupreply => BOOLEAN\nWill the people listed in the \"Cc\" headers (those who received\nthe message where you reply to now) also receive this message as\ncarbon copy?\n\ninclude => 'NO'|'INLINE'|'ATTACH'\nMust the message where this is a reply to be included in the\nmessage?  If \"NO\" then not.  With \"INLINE\" a reply body is\ncomposed. \"ATTACH\" will create a multi-part body, where the\noriginal message is added after the specified body.  It is only\npossible to inline textual messages, therefore binary or\nmultipart messages will always be enclosed as attachment.\n\nmaxsignature => INTEGER\nPassed to \"stripSignature\" on the body as parameter \"maxlines\".\nOnly effective for single-part messages.\n\nmessagetype => CLASS\nCreate a message with the requested type.  By default, it will be\na Mail::Message.  This is correct, because it will be coerced\ninto the correct folder message type when it is added to that\nfolder.\n\npostlude => BODY|LINES\nThe line(s) which to be added after the quoted reply lines.\nCreate a body for it first.  This should not include the\nsignature, which has its own option.  The signature will be added\nafter the postlude when the reply is INLINEd.\n\nprelude => BODY|LINES\nThe line(s) which will be added before the quoted reply lines.\nIf nothing is specified, the result of the replyPrelude() method\nis taken.  When \"undef\" is specified, no prelude will be added.\n\nquote => CODE|STRING\nMangle the lines of an \"INLINE\"d reply with CODE, or by\nprepending a STRING to each line.  The routine specified by CODE\nis called when the line is in $.\n\nBy default, '> ' is added before each line.  Specify \"undef\" to\ndisable quoting.  This option is processed after the body has\nbeen decoded.\n\nsignature => BODY|MESSAGE\nThe signature to be added in case of a multi-part reply.  The\nmime-type of the signature body should indicate this is a used as\nsuch.  However, in INLINE mode, the body will be taken, a line\ncontaining '-- ' added before it, and added behind the epilogue.\n\nstripsignature => REGEXP|STRING|CODE\nRemove the signature of the sender.  The value of this parameter\nis passed to Mail::Message::Body::stripSignature(pattern) unless\nthe source text is not included.  The signature is stripped from\nthe message before quoting.\n\nWhen a multipart body is encountered, and the message is included\nto ATTACH, the parts which look like signatures will be removed.\nIf only one message remains, it will be the added as single\nattachment, otherwise a nested multipart will be the result.  The\nvalue of this option does not matter, as long as it is present.\nSee Mail::Message::Body::Multipart.\n\nexample:\n\nmy $reply = $msg->reply\n( prelude         => \"No spam, please!\\n\\n\"\n, postlude        => \"\\nGreetings\\n\"\n, stripsignature => 1\n, signature       => $mypgpkey\n, groupreply     => 1\n, 'X-Extra'       => 'additional header'\n);\n\n$obj->replyPrelude( [STRING|$field|$address|ARRAY-$of-$things] )\nProduces a list of lines (usually only one), which will preceded\nthe quoted body of the message.  STRING must comply to the RFC822\nemail address specification, and is usually the content of a \"To\"\nor \"From\" header line.  If a $field is specified, the field's body\nmust be compliant.  Without argument -or when the argument is\n\"undef\"- a slightly different line is produced.\n\nAn characteristic example of the output is\n\nOn Thu Oct 13 04:54:34 1995, him@example.com wrote:\n\n$obj->replySubject(STRING)\nMail::Message->replySubject(STRING)\nCreate a subject for a message which is a reply for this one.  This\nroutine tries to count the level of reply in subject field, and\ntransform it into a standard form.  Please contribute improvements.\n\nexample:\n\nsubject                 --> Re: subject\nRe: subject             --> Re[2]: subject\nRe[X]: subject          --> Re[X+1]: subject\nsubject (Re)            --> Re[2]: subject\nsubject (Forw)          --> Re[2]: subject\n<blank>                 --> Re: your mail\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "Error: Cannot include reply source as $include.\nUnknown alternative for the \"include\" option of reply().  Valid\nchoices are \"NO\", \"INLINE\", and \"ATTACH\".\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "This module is part of Mail-Message distribution version 3.012, built\non February 11, 2022. Website: http://perl.overmeer.net/CPAN/\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "Copyrights 2001-2022 by [Mark Overmeer <markov@cpan.org>]. For other\ncontributors see ChangeLog.\n\nThis program is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.  See http://dev.perl.org/licenses/\n\nperl v5.34.0                      2022-02-Mail::Message::Construct::Reply(3pm)",
            "subsections": []
        }
    },
    "summary": "Mail::Message::Construct::Reply - reply to a Mail::Message",
    "flags": [],
    "examples": [],
    "see_also": []
}