Form.send revision 7c478bd95313f5f23a4c958a745db2134aa03244
#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
form="$ARG1 Mail"
help=OPEN TEXT OBJECTS/Text.h "$T" "mail/T.hsend$F"
framemsg="`message -o 'Press CHOICES to select, then press SAVE when you complete the form.'`"
altslks=true
`set -l EFRAME=false`
close=`indicator -w; rm -f /tmp/f.mx.${VPID}`
done=`message -w "Sending message. Please wait...";
echo "${F3}
~c ${F4}" | /usr/bin/mailx -s "${F2}" ${F1} 2>/tmp/f.mx.${VPID};
if [ -s /tmp/f.mx.${VPID} ];
then
message "An error has occured while sending your mail.";
if [ "${EFRAME}" = "false" ];
then
echo "OPEN TEXT OBJECTS/mail/Text.error";
else
echo "update OBJECTS/mail/Text.error true";
fi;
else
message "Message successfully sent.";
if [ "${EFRAME}" = "false" ];
then
echo "close OBJECTS/mail/Form.send";
else
echo "close OBJECTS/mail/Text.error OBJECTS/mail/Form.send";
fi;
fi`
name=To:
nrow=0
ncol=1
frow=0
fcol=12
rows=1
columns=60
lininfo=`set -l T="To" -l F=1`
rmenu=const { `sort +0 -1 -t: /etc/passwd | regex "^$LOGNAME:" "" '^([^:][^:]*)$0:[^:]*:[0-9][0-9][0-9][0-9]*:.*$' '"$m0"'` }
scroll=true
valid=`regex -v "${F1}" '^.+$' true '.*' false`
invalidmsg="This is a mandatory field."
value="${ARG2}"
name=Subject:
nrow=2
ncol=1
frow=2
fcol=12
rows=1
columns=60
lininfo=`set -l T="Subject" -l F=2`
scroll=true
value="${ARG3}"
name=Message:
nrow=4
ncol=1
frow=4
fcol=12
wrap=true
scroll=true
rows=5
columns=60
lininfo=`set -l T="Message" -l F=3`
name=Cc:
nrow=10
ncol=1
frow=10
fcol=12
rows=1
columns=60
lininfo=`set -l T="Cc" -l F=4`
rmenu=const { `sort +0 -1 -t: /etc/passwd | regex '^([^:][^:]*)$0:[^:]*:[0-9][0-9][0-9][0-9]*:.*$' '"$m0"'` }
scroll=true
name=HELP
button=9
action=help
name=CHOICES
button=10
action=choices
name=SAVE
button=11
action=done
name=PREV-FRM
button=12
action=prev-frm
name=NEXT-FRM
button=13
action=next-frm
name=CANCEL
button=14
action=`if [ "${EFRAME}" = "false" ];
then
echo "close OBJECTS/mail/Form.send";
else
echo "close OBJECTS/mail/Text.error OBJECTS/mail/Form.send";
fi`
name=CMD-MENU
button=15
action=cmd-menu
name=""
button=16
action=nop