.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 turned on, 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Mail::Message::Construct::Reply 3pm" .TH Mail::Message::Construct::Reply 3pm "2014-08-24" "perl v5.20.0" "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::Reply \- reply to a Mail::Message .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& my Mail::Message $reply = $message\->reply; \& my $quoted = $message\->replyPrelude($head\->get(\*(AqFrom\*(Aq)); .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 creating message replies. .SH "METHODS" .IX Header "METHODS" .SS "Constructing a message" .IX Subsection "Constructing a message" .ie n .IP "$obj\->\fBreply\fR(%options)" 4 .el .IP "\f(CW$obj\fR\->\fBreply\fR(%options)" 4 .IX Item "$obj->reply(%options)" Start a reply to this message. Some of the header-lines of the original message will be taken. A message-id will be assigned. Some header lines will be updated to facilitate message-thread detection (see Mail::Box::Thread::Manager). .Sp You may reply to a whole message or a message part. You may wish to overrule some of the default header settings for the reply immediately, or you may do that later with \f(CW\*(C`set\*(C'\fR on the header. .Sp \&\s-1ADDRESSES\s0 may be specified as string, or a Mail::Address object, or as array of Mail::Address objects. .Sp All \f(CW%options\fR which are not listed below \s-1AND\s0 start with a capital, will be added as additional headers to the reply message. .Sp .Vb 10 \& \-Option \-\-Default \& Bcc undef \& Cc <\*(Aqcc\*(Aq in current> \& From <\*(Aqto\*(Aq in current> \& Message\-ID \& Subject replySubject() \& To \& body undef \& group_reply \& include \*(AqINLINE\*(Aq \& max_signature 10 \& message_type Mail::Message \& postlude undef \& prelude undef \& quote \*(Aq> \*(Aq \& signature undef \& strip_signature qr/^\-\-\es/ .Ve .RS 4 .IP "Bcc => \s-1ADDRESSES\s0" 2 .IX Item "Bcc => ADDRESSES" Receivers of blind carbon copies: their names will not be published to other message receivers. .IP "Cc => \s-1ADDRESSES\s0" 2 .IX Item "Cc => ADDRESSES" The carbon-copy receivers, by default a copy of the \f(CW\*(C`Cc\*(C'\fR field of the source message. .IP "From => \s-1ADDRESSES\s0" 2 .IX Item "From => ADDRESSES" Your identification, by default taken from the \f(CW\*(C`To\*(C'\fR field of the source message. .IP "Message-ID => \s-1STRING\s0" 2 .IX Item "Message-ID => STRING" Supply a \s-1STRING\s0 as specific message-id for the reply. By default, one is generated for you. If there are no angles around your id, they will be added. .IP "Subject => STRING|CODE" 2 .IX Item "Subject => STRING|CODE" Force the subject line to the specific \s-1STRING,\s0 or the result of the subroutine specified by \s-1CODE. \s0 The subroutine will be called passing the subject of the original message as only argument. By default, \&\fIMail::Message::replySubject()\fR is used. .IP "To => \s-1ADDRESSES\s0" 2 .IX Item "To => ADDRESSES" The destination of your message. By default taken from the \f(CW\*(C`Reply\-To\*(C'\fR field in the source message. If that field is not present as well, the \&\f(CW\*(C`From\*(C'\fR line is scanned. If they all fail, \f(CW\*(C`undef\*(C'\fR is returned by this method: no reply message produced. .IP "body => \s-1BODY\s0" 2 .IX Item "body => BODY" Usually, the reply method can create a nice, sufficient message from the source message's body. In case you like more complicated reformatting, you may also create a body yourself first, and pass this on to this \&\f(CW\*(C`reply\*(C'\fR method. Some of the other options to this method will be ingored in this case. .IP "group_reply => \s-1BOOLEAN\s0" 2 .IX Item "group_reply => BOOLEAN" Will the people listed in the \f(CW\*(C`Cc\*(C'\fR headers (those who received the message where you reply to now) also receive this message as carbon copy? .IP "include => '\s-1NO\s0'|'\s-1INLINE\s0'|'\s-1ATTACH\s0'" 2 .IX Item "include => 'NO'|'INLINE'|'ATTACH'" Must the message where this is a reply to be included in the message? If \f(CW\*(C`NO\*(C'\fR then not. With \f(CW\*(C`INLINE\*(C'\fR a reply body is composed. \f(CW\*(C`ATTACH\*(C'\fR will create a multi-part body, where the original message is added after the specified body. It is only possible to inline textual messages, therefore binary or multipart messages will always be enclosed as attachment. .IP "max_signature => \s-1INTEGER\s0" 2 .IX Item "max_signature => INTEGER" Passed to \f(CW\*(C`stripSignature\*(C'\fR on the body as parameter \f(CW\*(C`max_lines\*(C'\fR. Only effective for single-part messages. .IP "message_type => \s-1CLASS\s0" 2 .IX Item "message_type => CLASS" Create a message with the requested type. By default, it will be a Mail::Message. This is correct, because it will be coerced into the correct folder message type when it is added to that folder. .IP "postlude => BODY|LINES" 2 .IX Item "postlude => BODY|LINES" The line(s) which to be added after the quoted reply lines. Create a body for it first. This should not include the signature, which has its own option. The signature will be added after the postlude when the reply is INLINEd. .IP "prelude => BODY|LINES" 2 .IX Item "prelude => BODY|LINES" The line(s) which will be added before the quoted reply lines. If nothing is specified, the result of the \fIreplyPrelude()\fR method is taken. When \f(CW\*(C`undef\*(C'\fR is specified, no prelude will be added. .IP "quote => CODE|STRING" 2 .IX Item "quote => CODE|STRING" Mangle the lines of an \f(CW\*(C`INLINE\*(C'\fRd reply with \s-1CODE,\s0 or by prepending a \&\s-1STRING\s0 to each line. The routine specified by \s-1CODE\s0 is called when the line is in \f(CW$_\fR. .Sp By default, \f(CW\*(Aq> \*(Aq\fR is added before each line. Specify \f(CW\*(C`undef\*(C'\fR to disable quoting. This option is processed after the body has been decoded. .IP "signature => BODY|MESSAGE" 2 .IX Item "signature => BODY|MESSAGE" The signature to be added in case of a multi-part reply. The mime-type of the signature body should indicate this is a used as such. However, in \s-1INLINE\s0 mode, the body will be taken, a line containing \f(CW\*(Aq\-\- \*(Aq\fR added before it, and added behind the epilogue. .IP "strip_signature => REGEXP|STRING|CODE" 2 .IX Item "strip_signature => REGEXP|STRING|CODE" Remove the signature of the sender. The value of this parameter is passed to Mail::Message::Body::stripSignature(pattern) unless the source text is not included. The signature is stripped from the message before quoting. .Sp When a multipart body is encountered, and the message is included to \&\s-1ATTACH,\s0 the parts which look like signatures will be removed. If only one message remains, it will be the added as single attachment, otherwise a nested multipart will be the result. The value of this option does not matter, as long as it is present. See Mail::Message::Body::Multipart. .RE .RS 4 .Sp example: .Sp .Vb 8 \& my $reply = $msg\->reply \& ( prelude => "No spam, please!\en\en" \& , postlude => "\enGreetings\en" \& , strip_signature => 1 \& , signature => $my_pgp_key \& , group_reply => 1 \& , \*(AqX\-Extra\*(Aq => \*(Aqadditional header\*(Aq \& ); .Ve .RE .ie n .IP "$obj\->\fBreplyPrelude\fR( [STRING|$field|$address|ARRAY\-$of\-$things] )" 4 .el .IP "\f(CW$obj\fR\->\fBreplyPrelude\fR( [STRING|$field|$address|ARRAY\-$of\-$things] )" 4 .IX Item "$obj->replyPrelude( [STRING|$field|$address|ARRAY-$of-$things] )" Produces a list of lines (usually only one), which will preceded the quoted body of the message. \s-1STRING\s0 must comply to the \s-1RFC822\s0 email address specification, and is usually the content of a \f(CW\*(C`To\*(C'\fR or \f(CW\*(C`From\*(C'\fR header line. If a \f(CW$field\fR is specified, the field's body must be compliant. Without argument \-or when the argument is \f(CW\*(C`undef\*(C'\fR\- a slightly different line is produced. .Sp An characteristic example of the output is .Sp .Vb 1 \& On Thu Oct 13 04:54:34 1995, him@example.com wrote: .Ve .ie n .IP "$obj\->\fBreplySubject\fR(\s-1STRING\s0)" 4 .el .IP "\f(CW$obj\fR\->\fBreplySubject\fR(\s-1STRING\s0)" 4 .IX Item "$obj->replySubject(STRING)" .PD 0 .IP "Mail::Message\->\fBreplySubject\fR(\s-1STRING\s0)" 4 .IX Item "Mail::Message->replySubject(STRING)" .PD Create a subject for a message which is a reply for this one. This routine tries to count the level of reply in subject field, and transform it into a standard form. Please contribute improvements. .Sp example: .Sp .Vb 6 \& subject \-\-> Re: subject \& Re: subject \-\-> Re[2]: subject \& Re[X]: subject \-\-> Re[X+1]: subject \& subject (Re) \-\-> Re[2]: subject \& subject (Forw) \-\-> Re[2]: subject \& \-\-> Re: your mail .Ve .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" .ie n .IP "Error: Cannot include reply source as $include." 4 .el .IP "Error: Cannot include reply source as \f(CW$include\fR." 4 .IX Item "Error: Cannot include reply source as $include." Unknown alternative for the \f(CW\*(C`include\*(C'\fR option of \fIreply()\fR. Valid choices are \f(CW\*(C`NO\*(C'\fR, \f(CW\*(C`INLINE\*(C'\fR, and \f(CW\*(C`ATTACH\*(C'\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of Mail-Box distribution version 2.117, built on August 24, 2014. Website: \fIhttp://perl.overmeer.net/mailbox/\fR .SH "LICENSE" .IX Header "LICENSE" Copyrights 2001\-2014 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://www.perl.com/perl/misc/Artistic.html\fR