.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.30) .\" .\" 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 1" .TH MAIL 1 "2001-06-06" "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 \-\- implementation of Berkeley mail(1) .SH "SYNOPSIS" .IX Header "SYNOPSIS" mail [\fB\-f\fR mailbox] .PP mail [\fB\-s\fR subject] [\fB\-c\fR cc\-addrs] [\fB\-b\fR bcc\-addrs] to-addr [..toaddr..] .SH "DESCRIPTION" .IX Header "DESCRIPTION" When called without command-line options (except \fB\-f\fR) \fImail\fR allows the user to interactively send mail, and manage a mail folder. Otherwise, \fImail\fR allows the user to send outgoing E\-mail to recipients. .PP When run interactively, the mail folder ~/mbox is used. If the home directory cannot be determined, ./mbox is assumed. This can be overridden with the \fB\-f\fR option. .SS "\s-1OPTIONS\s0" .IX Subsection "OPTIONS" \&\fImail\fR accepts the following options .IP "\fB\-f\fR mailbox" 4 .IX Item "-f mailbox" Specifies a mail folder to use. .IP "\fB\-s\fR subject" 4 .IX Item "-s subject" Specify a subject for the mail message. .IP "\fB\-c\fR cc-addrs" 4 .IX Item "-c cc-addrs" A \fIcomma-separated\fR list of addresses to be copied to on the mail message. .IP "\fB\-b\fR bcc-addrs" 4 .IX Item "-b bcc-addrs" A \fIcomma-separated\fR list of addresses to be copied to on the mail message, without appearing in the headers. .IP "to-addr" 4 .IX Item "to-addr" E\-Mail destination addresses. You may not be notified if mail fails to deliver to the address properly. .SS "\s-1COMMANDS\s0" .IX Subsection "COMMANDS" In the list below, \*(L"msg\*(R" indicates a message list. Acceptable values are comma or space separated lists, ranges (i.e. 1\-5) or single digits. Special values are \*(L"$\*(R" (end of list) and * (all messages). If messages are unspecified, the current message is used. \*(L"path\*(R" indicates a filename argument. \*(L"addr\*(R" indicates a mail message address list (comma or space separated). .IP "number" 4 .IX Item "number" Read message \fInumber\fR. .IP "!command" 4 .IX Item "!command" Execute the \*(L"command\*(R" with the command interpreter. .IP "copy msg path" 4 .IX Item "copy msg path" Copy indicated messages (\fImsg\fR) to filename at \fIpath\fR. \&\fBco\fR is an alias for this command. .IP "delete msg" 4 .IX Item "delete msg" Delete indicated messages. \&\fBd\fR is an alias for this command. .IP "exit" 4 .IX Item "exit" Exit the \fImail\fR program saving no changes to the mailbox. \&\fBx\fR is an alias for this command. .IP "from msg" 4 .IX Item "from msg" Display the headers from the specified messages. \&\fBf\fR is an alias for this command. .IP "headers msg" 4 .IX Item "headers msg" Display a brief list of headers from the messages. \&\fBh\fR is an alias for this command. .IP "hold msg" 4 .IX Item "hold msg" Mark messages as unread. \fBho,preserve\fR are aliases for this command. .IP "mail addr" 4 .IX Item "mail addr" Send a mail message to addr. \fBm\fR is an alias for this command. .IP "next" 4 .IX Item "next" Print the next message in sequence. \fBn\fR is an alias for this command. .IP "print msg" 4 .IX Item "print msg" Print the specified mail message. \fBp,CR\fR are aliases for this command. .IP "quit" 4 .IX Item "quit" Exit the mail program. The (possibly) edited mailbox is re-written to its original file. See \fBBugs\fR. \fBq\fR is an alias for this command. .IP "reply msg" 4 .IX Item "reply msg" Reply to the original sender of \fImsg\fR. \fBr\fR is an alias for this command. .IP "Reply msg" 4 .IX Item "Reply msg" Reply to the original sender, and all visible recipients of \fImsg\fR. \&\fBR\fR is an alias for this command. .IP "save msg path" 4 .IX Item "save msg path" Save \fImsg\fR into the file specified at \fIpath\fR. If the file exists, it is appended. \fBs\fR is an alias for this command. .IP "shell" 4 .IX Item "shell" Start an interactive \fIbourne\fR shell. (This does not work under Win32). \&\fBsh\fR is an alias for this command. .IP "top" 4 .IX Item "top" Display the first few lines of the current mail message. .IP "undelete msg" 4 .IX Item "undelete msg" Mark as undeleted any specified mail messages. \&\fBu\fR is an alias for this command. .IP "unread msg" 4 .IX Item "unread msg" Mark as unread any specified mail messages. \&\fBU\fR is an alias for this command. .IP "visal msg" 4 .IX Item "visal msg" Invoke the visual editor (specified in \f(CW$VISUAL\fR, or /usr/bin/vi) on the indicated messages. Re-read those messages in afer the editing session. \&\fBv\fR is an alias for this command. .IP "write msg path" 4 .IX Item "write msg path" Write the \fIbodies\fR of the indicated messages to path. \&\fBw\fR is an alias for this command. .SS "\s-1EDITING COMMANDS\s0" .IX Subsection "EDITING COMMANDS" When sending a mail message (commands \fBmail, reply or Reply\fR) a primitive line-mode editor is used to get the body of the mail message, and possibly change any header options. During the editing session, special commands may be used when typed at the beginning of the line. .PP To send the message, send an \s-1EOF\s0 character or a \*(L".\*(R" on a line by itself. .IP "~ssubject" 4 .IX Item "~ssubject" Change message subject to \fIsubject\fR. .IP "~q" 4 .IX Item "~q" Quit the message editor. No changes are made, no message is sent. .IP "~caddr[,addr...]" 4 .IX Item "~caddr[,addr...]" Add the \fIaddr\fRs to the \s-1CC\s0 list for the message .IP "~baddr[,addr...]" 4 .IX Item "~baddr[,addr...]" Add the \fIaddr\fRs to the \s-1BCC\s0 list for the message .IP "~taddr[,addr...]" 4 .IX Item "~taddr[,addr...]" Add the \fIaddr\fRs to the To: list for the message .IP "~mmsg" 4 .IX Item "~mmsg" Read the specified messages into the current message at the end. .IP "~fmsg" 4 .IX Item "~fmsg" Read the specified messages into the current message at the end, indenting each line with the sequence \*(L"> \*(R". .IP "~rfile" 4 .IX Item "~rfile" Read the contents of \fIfile\fR into the message. .IP "~v" 4 .IX Item "~v" Invoke the visual editor on the message. When the user is done editing the message, read the message back in, and continue editing at the end. .SH "BUGS" .IX Header "BUGS" Numerous. Mostly lack of refinement in the implementation, any of which can be fixed without hassle, I'm sure. .IP "\(bu" 4 Many (many, many..) features left unimplemented. Command-line, commands and editing functions have all been decimated. I only implemented what I thought was useful. \fI\s-1BSD\s0 mail\fR had many years to develop its many tentacles. I don't have that kind of patience. .IP "\(bu" 4 Keeping track of the \*(L"current\*(R" message in the mail folder is sloppy. .IP "\(bu" 4 Screen length is assumed to be 23 characters. Width is 79. .IP "\(bu" 4 Argument parsing doesn't ensure sane (and legal) combinations. .IP "\(bu" 4 There is \fBno\fR file locking. Of anything. You wanna re-write the mailbox and there's local delivery going on? Fine. Have fun. \fImail\fR will refuse to write back a mailbox whose size has changed however... .IP "\(bu" 4 \&\fImail\fR doesn't act as a Local Delivery Agent. .IP "\(bu" 4 \&\fImail\fR's method of picking through mail message headers to find from, to and cc addresses violates several \s-1FAQ\s0's, \s-1RFC\s0's, and is void where prohibited. Also easy to fix, I simply ran out of patience. See the _extract method in the message class if you're adventuresome. .IP "\(bu" 4 To perform delivery, mail searches for \f(CW$USER\fR or \f(CW$LOGNAME\fR in your environment to see who you are (for a From address). It then searches for an \s-1SMTP\s0 agent on localhost. Not finding that, it wants \f(CW$RELAYHOST\fR set to your \s-1SMTP\s0 relaying host name. Your reply address is taken from \f(CW$REPLYADDR\fR or your system's environment. Whichever is easier. Win32 systems, be prepared to setup your environment properly for this to work! .IP "\(bu" 4 \&...speaking of \s-1SMTP... \s0\fImail\fR talks directly to \s-1SMTP\s0 instead of using a more sane method like Mail::Mailer. This was done so that \s-1PPT\s0 \fImail\fR\|(1) could remain \&\*(L"pure\*(R" and un-encumbered by external modules. .IP "\(bu" 4 This code is not \*(L"use strict\*(R" safe. Although there's not much keeping it from being \*(L"use strict\*(R" safe. Use of package-based variables will probably get me thumped from Tom. .SH "AUTHOR" .IX Header "AUTHOR" The Perl implementation of \fImail\fR was written by Clinton Pierce, \fIclintp@geeksalad.org\fR. .SH "COPYRIGHT and LICENSE" .IX Header "COPYRIGHT and LICENSE" This program is Copyright 1999, by Clinton Pierce. .PP Freely redistributable under the Perl Artistic License.