On Nocar Goto dropped print ' [1] User E-mail [2] User System Mail [3] DYM Mail' input \"Use what mail? "a if a=1 ma$="e:mail" if a=2 ma$="e:gmail" if a=3 ma$="i1:mail" ready ma$:Open #2,"b:users" main Print \ "Mail management utility" main1 Input @0 \ "Mail cmd (?=help):" i$ If Not Instr(i$,"?ARDQ") Print \ "Illegal command.":Goto main1 Push main1 If i$="?" Goto help If i$="A" Pop:Close #2:Link "a:system.seg" If i$="R" Goto rdmail If i$="D" Goto delete If i$="Q" Goto quickscn help Setint(1):Print \ s$ \\ "Mail utility commands:" \ Left$(md$,30) Print 'A -> Abort to main R -> Read all mail D -> Delete old mail Q -> Quick-scan mail file'\ Left$(md$,30) Setint(""):Return rdmail Print \ "Read all mail" Input @2 \ "Starting user (#,CR=1):" i$ y=0:x=Val(i$):If x Then x=x-1 rdmail1 If xnu Goto rdmail3 z=Len(Str$(x-1))+1:Print Chr$(8,z) x "]"; If Msg(x) y=y+1:Gosub found:Goto rdmail1 Goto rdmail2 rdmail3 If Not y Print \\ "No mail found."; Print:Return found Gosub rduser Print \\ "Mail found for " a$;b$ found1 Print \ "[E]dit [R]ead [P]rint [W]rite [K]ill [N]ext [Q]uit" Input @0 "--> " i$ If Not Instr(i$,"ERPKQWN") Print \ "What ?":Goto found1 If i$="Q" Pop:Return If i$="N" Return a=0:Push found1 If i$="P" a=5:Goto read If i$="R" Goto read If i$="W" Goto write.disk If i$="E" Goto edit.mail Kill #Msg(x):Msg(x)=0:Update Print \ "Killed." Pop:Return read Ready #Msg(x) If not a Print \ s$ \ "Press N for next letter" \\ md$ read1 Input #7,i$:If i$="" Print #a, \ "< End of mail >":Return Setint(2):Copy #7,#a:Setint(""):Print #a,\ md$ If Key(1) Print:Return Goto read1 rduser Position #2,64,x:Input #2,a$,b$ a$=a$+" "+b$:b$=" (#"+Str$(x)+")" Return quickscn Print \ "Quick-scan mail file" Input @0 \ "Dump to printer ? " i$ a=0:If i$="Y" a=5 y=0:Print #a, \ "The following users have mail:" \ For x=1 To nu If Msg(x) Gosub rduser:Print #a,a$;b$:y=y+1 Next If y Print #a, \ y " user(s) found with mail.":Return Print #a,"< No mail found >" Return delete Print \ "Delete old mail" Print \ "Enter date (CR=abort)" \ Input @2 "Month -> " d1$:If d1$="" Return Input @2 "Day -> " d2$:If d2$="" Return Input @2 "Year -> " d3$:If d3$="" Return del1 Input @0 \ "[A]uto-kill [P]rompted or [Q]uit ? " f$ If Not Instr(f$,"APQ") Print \ "What ?":Goto del1 If f$="Q" Return y=0:If f$="A" y=1 x=0:If y Print \ "Scanning & updating [0]"; del2 X=X+1 If y z=Len(Str$(x-1))+1:Print Chr$(8,z) x "]"; If Msg(x) Ready #Msg(x):Goto del3 If xVal(Mid$(i$,7,2)) Goto del4 If Val(d1$)Val(Left$(i$,2)) Goto del4 If Val(d2$)"Y" Goto del2 del5 Kill #Msg(x):Update Goto del2 dropped Link "a:main.seg","term1" write.disk input @2 \"Filename (to write):" i$ if i$="" return create i$:rewind:open #1,i$:input #7,i$ append #1:copy #7,#1:close #1:return edit.mail input @0 \"Are you sure? (Y/[N]): " i$:if i$<>"Y" return edit(0):rewind:input #7,i$:copy #7,#8 edit(1):if not edit(2) return a=msg(x):kill #msg(x):print #msg(x),un print #6,"Letter From -%>"a4$ print #6,"Date Mailed -%>"date$" "time$\ copy #8,#6:msg(x)=a:update:return