home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
comm
/
zcm_scrp.zip
/
GEMAILU.T
< prev
next >
Wrap
Text File
|
1989-11-21
|
4KB
|
155 lines
::
:: This one is a file named "gemailu.t" and it goes in %lib
:: Discussion at end of script
::
echo "GEMAILU.T Revised 10-11-89. File = %item"
pattern
open -!tg %item
grab s4
split s4 " "; if "!Jz0,=/" goto nox
split s4 "="
if !f%z0 echo "%z0: NOT FOUND"; goto foox
put "m200:11\r"
pat 0l "receiving Personal Com"
wait
if %z1 put "%z1\r"
else put "%z0\r"
pat 0i "item, or <Q>uit"
wait
put "2\r"
pat 0l "INPUT\r"
wait
sx %z0
pat 0 "Press <Return>"
wait
put "\r"
grab s4
grab s0
if !t echoc "%item Short file! "; goto foox
if %s0>30 echo "Subject line will be shortened!"
goto xo
nox: if "!js4,:" goto oldnox ; check for old format
echoc "New format message"
split s4 ": " " "
sets s4 %z1
set s5 ""
again:
grab s0
ss s0 "(^To: *|^cc: *|^ *)([^ ]+)"
if !%z2 goto sub
if Iz2,s4 goback again : Strip respondent's extra copy
if %s5 sets s5 "%s5,"
sets s5 "%s5%z2"
goto again
sub: grab s0
if !t echoc "%item Short file! "; goto foox
if "js0,:" split s0 " :" ""; sets s0 %z1;
ss s0 "(^ *)(.*)"; ss z2 "(.*)( *$)"; sets s0 %z1
if %s0>30 echo "Subject line will be shortened!"
: echo <TO>%s4
: echo <CARBON>%s5
: echo <SUBJECT>%s0
put "m200:6\r"
pat 0$ "To:"
wait
put %s4\r
pat 0 "Carbon Copy:"
pat 1 "ignored - not found "
wait
: One or more addressees not found - abort
if 1 put "*X\r"; wait -f15; put "*X\r"; wait -f15; goto foobar
put %s5\r
: echo <TO>%s4
: echo <CARBON>%s5
: echo <SUBJECT>%s0
goto sub2
oldnox: echoc "Old format message"
grab s0
if !t echoc "%item Short file! "; goto foox
if %s0>30 echo "Subject line will be shortened!"
put "m200:6\r"
xo: split s4 " "
pat 0$ "To:"
wait
put %z0\r
pat 0 "Carbon Copy:"
wait
put %z1\r
sub2: pat 0 "Sub:"
wait
put %s0\r
pat 0 "FOR INPUT"
pat 1 "text:"
wait -f40
set blankfill " "
pg62; pp600; t -gxp
ena -t!p; pp250
put "*S\r"
set blankfill ""
pat
pat 2c "Sent"
pat 0 "%pr"
wait -f15
if !2 goto foobar
obey "!mv %item Z%item.tmp"
echoc "File Uploaded: %item moved to Z%item.tmp"
ena -gt
return
foobar: echoc "File Not Accpeted"
foox: echo "Moving file to backup name"
: abort; **********
obey "!mv %item Y%item.tmp"
echoc "File Rejected: %item moved to Y%item.tmp"
ena -gt
nolog closetx
return
::
:: file for email uploads takes one of 3 formats (Xmodem u/l, Old and New).
:: The Xmodem format uploads a file as part of an old format message.
:: The old format is handy for originiating messages.
:: The new format is handier for answering messages
::
XMODEM Format:
***************************
local_pathname[=remote_filename]
This line must have a "/" in it or end with "=" to be recognized
as file spec instead of To: address. NO SPACES!
Example: /yam/phones.t=cafpho.t
Example: ./orders.dat
Rest of message is Old Format.
Old Format:
***************************
to[<TAB>carbon] %s4
Subject %s0
text
***************************
New Format (from incoming message) :
***************************
From: HOMCHICK Paul Homchick,IBM PC RoundTbl SYSOP
D.KOZINN David Kozinn
ROCKNEY Vaughn Rockney
SCHNEIDER Leo Schneider
STROM Charles Strom
caf
Sub: Overthruster Downloads
***************************
Notes on new format: The colon on the first distinguishes it from the
old format. First line gets parsed to the main To address, minus the
long name if present.
Succeeding lines are carbon copies, parsed the
same way. The leading spaces are optional.
Then a blank line.
Next is subject. Leading Sub: is eliminated.
Rest of file is the body of the message.
Do not begin any lines with Nathan.