home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cuteskunk BBS
/
cuteskunk.zip
/
cuteskunk
/
Cellular2
/
1c.txt
< prev
next >
Wrap
Text File
|
2003-06-29
|
1KB
|
63 lines
#! /bin/csh -fB
### This is a simple shell script for easy use of anonymous mail. To run the
### program just save it and delete everything up until the #! /bin/csh -fB
### line. Then just type the name you save it as or the name and whoever
### you will be mailing. e.g. amail bill@some.university.edu or just amail.
###
if ($1 != "") then
set mto=$1
else
echo 'To: '
set mto=$<
endif
echo -n 'From: '
set mfrom=$<
echo -n 'Use which host for smtp (return for '`hostname`') ? '
set usehost=$<
echo -n 'Use which editor (return for vi)? '
set editor=$<
if($editor =="") then
set editor=vi
endif
if ($mfrom == "") then
set mfrom=`whoami`'@'`hostname`
endif
echo 'helo amail' >> tmpamail1
echo 'mail from: '$mfrom >> tmpamail1
echo 'rcpt to: '$mto >> tmpamail1
echo 'data' >> tmpamail1
$editor tmpamail2
clear
echo -n 'Are you sure you want to send this? '
set yorn=$<
if($yorn == 'y') then
echo . >> tmpamail2
echo quit >> tmpamail2
cat tmpamail2 >> tmpamail1
telnet $usehost 25 < tmpamail1 > /dev/null
echo 'Mail has been sent to: '$mto
echo ' From: '$mfrom
endif
rm tmpamail1 tmpamail2