Email to multiple or all users

Author :  E.L. Word
Requires full mod  : Electronic Odyssey Mailcentre

;Introducing the Electronic Odyssey Mailcentre

;This GBBS 1.3j segment will add the capability to send a mailing to all
;users on your system or to users that you select.

;In it’s simplest form you will write a letter and the be prompted for a ;Flag#
to send it to. You will then get a listing of all users with that flag ;set. You
may then “A)utomatically send” to all the users listed, or ask for ;a “P)rompted
send” and then be prompted “User Name ([Y]/N)” for each message ;to be sent.

;This is a real nice mod to GBBS and it took a lot of thought and effort. I ;ask
only one small favor in return. In the past we have written some nice
;additions to GBBS, BBSLISTER1.1G.S which was shipped with EFTS comes to ;mind. Well, recently I have found it uploaded to P+ with minor changes, our ;credit line removed and replaced by ‘explitive deleted’ someone elses
;credit. Have a heart. Feel free to use this seg and build on it, but give
;credit when due.

;From the heart,


;P.S. Thank you Jan Porter for help we gleaned from your userlist.seg.s
; Electronic Odyssey Elite
; mailcentre.s
; ************************
; MailCentre 1.3ja
; (c)12/02/87
; written by
; Christopher Goff
; by request of
; E.L. Word
; Electronic Odyssey
; 313/xxx-xxxx
;This module will allow you to to write
;a letter or load a file and then send
;it via mail, in mass, or by individual
;selection, to users whose
;flag number you will select.
;In your main.seg.s
;add to your menu

;if (i$="MC") and (flag(34)) link"a:mailcentre"

;This will allow only sysops flag(34) to be
;able to use this feature.

;Also you will want to search the mailcentre.s
;program for the label

 ; ready "g:mail" <-make sure this line contains
 ; the drive specifier of your mail

;As a precaution you should back up your mail
;file before testing this the first time. See
;how it works. Try some mail sending of your own.
;Send a couple letters to different user flags.
;When you are satisfied with its operation put
;the original mail file back and send your users
;a short, positive, and upbeat letter. Try to
;end with a question and you’ll get more replies.

;”Hi…Hope you are enjoying the system. How are
; we doing so far?”

;You will get a lot of responses. Everyone loves
;to log on and have mail waiting.

;If you are enjoying the MailCentre, or any of our
;other modules, you’ll let us know. Won’t you?
;E.L. Word
;Electronic Odyssey Elite BBS
;or contact at P+

;PS. The main menu also includes a hidden D)OS
;command. You can use it to CAT your drive when
;you are looking for a file to G)et. If others
;are going to have access to this module you may
;want to alter the flag needed to use it or even
;REM out the line “if (i$=D)”….etc
;search for “b:xdos” in the mailcentre.s and
;make sure “xdos” on your “b:” drive

on nocar goto link.term

 print\\"MailCentre 1.3ja"\"courtesy of"\"Electronic Odyssey
 print\"W)rite a new letter"
 print"G)et a file to use"
 input @2\"RETURN to Quit:";i$
 if i$="W" gosub get.sub:goto enterfile
 if i$="G" gosub get.sub:goto edit.file
 if (i$="D") and (flag(34)) goto dos.cmd
 if i$="" goto quit

 print\\"Flag # to send letter to"
 input@2 "? = help: ";num$
 if num$="" goto quit
 if num$="?" gosub stat.mnu:goto main2
 a = val(num$)
 if a <0 or a > 34 goto main2
 print\\\"Here are the users with that flag set:"\
 for x = 1 to nu
 gosub finduser
 if y print c$
 print \\"A)utomatic mail send"
 print "P)rompted mail send"
 input@2 "Return to abort: " i$
 if i$ <> "A" and i$<> "P" goto quit
 pr = 0
 if i$="P" then pr = 1
 print \"Mail on its way to:"\
 for x = 1 to nu
 gosub finduser
 if not y goto main2a
 print c$;
 if pr input @2" ([Y]/N): ";i$
 if i$="" i$="Y"
 if pr and i$<>"Y" goto main2a
 if not pr print
 gosub wr.ltr
 goto quit

;finds user x with flag(a) set...
 ;y contain 1 if good user 0 if deleted
 y = 0
 open #1,"b:users"
 position #1,128,x
 input #1,a$,b$\c$
 if a$="" goto find2
 position #1,128,x,70
 move ram,58 to ram2:on nocar::read #1,ram,58
 if flag(a) y = 1
 move ram2,58 to ram:on nocar goto link.term

 print\"Enter your message now"
 clock(2) = 0
 clock(2) = cl
 if not edit(2) goto quit
 goto main2

 print \"Get a File to Mail"
 input @2 \"File Name (to load):" i$
 edit(0):if i$<>"" copy i$,#8
 print \"Enter/Edit File Now: "edit(3)" cols"
 print "Type 'DONE' when finished '.h' for help"
 edit(1):if not edit(2) goto quit
 goto main2

 ready "g:mail"
 if info(6)<29 print "Mail bitmap full":return
 print #msg(x),un
 print #6,"Subj ->"sb$
 print #6,"From ->"a3$"(#"un")"
 print #6,"Date ->"date$" "time$\
 copy #8,#6:print #msg(x),chr$(4);chr$(0);

 setint(1):print \s$\
 open #1,"b:data2"
 for i=1 to 33
 if not flag(i) goto stat1nxt
 position #1,32,i
 input #1,a$
 if key(0)=32 then i=33:goto stat1nxt
 if a$="" goto stat1nxt
 i$=right$(" "+str$(i),2)
 print " - "i$") "a$

 input @2\"DOS: "i$:if i$="" return
 use "b:xdos",i$:goto main1

 link "a:main.seg","term1"

 link "a:main.seg","return"

 input @3\\"Subject of mail: ";sb$:if sb$="" sb$="None"