ECHO OFF
:*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
:  Silver Xpress Mail System
:     (c) copyright 1988-1990 by Santronics Software
:
:  Note: XPSUB is an optional program. Helps with memory if needed
:*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
:  At a minimum, all you need in this batch file is:
:     echo off
:     cd\xpress
:     xpmail switch settings
:     cd\rbbs
:  But a more detail setup is:
:
CD \XPRESS
:
:start
 xpmail -P1 %1 %2 %3 %4 %5 %6 %7
:check_for_process
 if not exist process.dat goto no_process
   xpsub -P1
   erase process.dat
   xpmail -P1 %1 %2 %3 %4 %5 %6 %7 -RESTART
  goto check_for_process
:
:no_process
:

:-------------------------OPTIONAL-----------------------------------
: Check for any mail uploaded. These errorlevels match my settings in
: xpcfg.  The stuff is normally not required. There are only here to
: show you how you can set a post mail-processing of mail uploaded
: after the user logs off. The *.$$$ files can serve as semiphores or
: indicators. If you use this within a FidoNet message base arrangment
: you can speed up your mail packing by telling QMAIL or CONFMAIL
: to scan only if any of the *.$$$ exist.  To make this work, all
: you need to do is add to your POST LOGOFF LOGIC:
:
:       IF EXIST \XPRESS\*.$$$ QM SCAN PACK -SNORMAL -FECHOTOSS.LOG
:       IF EXIST \XPRESS\*.$$$ DEL \XPRESS*.$$$
:-------------------------OPTIONAL-----------------------------------

  IF ERRORLEVEL 3 goto echomat
  IF ERRORLEVEL 2 goto matrix
  IF ERRORLEVEL 1 goto echo
  goto end
:
:echomat
  echo nul > echomat.$$$
  goto end
:
:matrix
  echo nul > matrix.$$$
  goto end
:
:echo
  echo nul > echo.$$$
  goto end
:
:end
: Return to RBBS DIRECTORY
:
CD \RBBS
