home *** CD-ROM | disk | FTP | other *** search
/ Windows 95 Shareware (Platinum Edition) / QUEPLAT95.ISO / files / programm / sbe_120 / mailer.bat < prev    next >
Encoding:
DOS Batch File  |  1995-11-12  |  5.1 KB  |  137 lines

  1. @echo off
  2. rem ***************************************************************************
  3. rem MAILER.BAT (AKA IMRUN.BAT or FDRUN.BAT) file for use with FrontDoor or
  4. rem InterMail and Synchronet BBS Version 2
  5. rem 
  6. rem If you get OUT OF ENVIRONMENT SPACE messages when using this batch file,
  7. rem increase your DOS environment by adding the following to your CONFIG.SYS:
  8. rem SHELL=C:\COMMAND.COM /E:1024 /P
  9. rem ***************************************************************************
  10.  
  11. rem ***************************************************************************
  12. rem Set this to IM for InterMail or FD for FrontDoor
  13. rem ************************************************
  14. set fd=FD
  15.  
  16. rem ***************************************************************************
  17. rem Node Number - needed for NODE utility
  18. rem *************************************
  19. set nodenum=1
  20.  
  21. rem ***************************************************************************
  22. rem SBBS Directory 
  23. rem **************
  24. set sbbs=c:\sbbs
  25.  
  26. rem ***************************************************************************
  27. rem SBBS CTRL Dir - needed for NODE utility
  28. rem ***************************************
  29. set sbbsctrl=%sbbs%\ctrl
  30.  
  31. rem ***************************************************************************
  32. rem SBBS NODE Dir - needed for SBBSECHO (use NODE1 directory)
  33. rem *********************************************************
  34. set sbbsnode=%sbbs%\node1
  35.  
  36. :top
  37. rem ***************************************************************************
  38. rem Set Node status to WAITING FOR CALL
  39. rem ***********************************
  40. %sbbs%\exec\node status=0 %nodenum% rerun off %nodenum% event off %nodenum%
  41.  
  42. rem ***************************************************************************
  43. rem Drive letter and directory where Mailer is installed 
  44. rem ****************************************************
  45. c:
  46. cd \%fd%
  47. %fd%
  48.  
  49. rem ***************************************************************************
  50. rem These error levels must be set in FDSETUP or IMSETUP!
  51. rem *****************************************************
  52. if errorlevel 200 goto fax
  53. if errorlevel 100 goto bbs
  54. if errorlevel  75 goto event
  55. if errorlevel  50 goto inmail
  56. if errorlevel  25 goto outmail
  57. if errorlevel  10 goto userbreak
  58. if errorlevel   1 goto error
  59. goto end
  60.  
  61. rem ***************************************************************************
  62. rem Mailer received in-bound mail from another system 
  63. rem *************************************************
  64. :inmail
  65. echo Importing in-bound mail!!!
  66. rem ***************************************************************************
  67. rem Set node status to NETWORKING
  68. rem *****************************
  69. %sbbs%\exec\node status=6 %nodenum%
  70. %sbbs%\exec\sbbsecho /les!
  71. goto top
  72.  
  73. rem ***************************************************************************
  74. rem Semaphore file (xxEXIT.025) was signaled by the BBS - new outbound messages
  75. rem ***************************************************************************
  76. :outmail
  77. echo Exporting out-bound mail!!!
  78. rem ***************************************************************************
  79. rem Set node status to NETWORKING
  80. rem *****************************
  81. %sbbs%\exec\node status=6 %nodenum%
  82. %sbbs%\exec\sbbsecho /lin
  83. rem ***************************************************************************
  84. rem Signal the rescan semaphore so that FD will rescan the netmail folder
  85. rem *********************************************************************
  86. rem > fdrescan.now
  87. goto top
  88.  
  89. rem ***************************************************************************
  90. rem Received a call from a user wanting access to the BBS - how dare they!
  91. rem This actually executes EXEBBS.BAT with the proper switches for SBBS
  92. rem You will probably also need to edit EXEBBS.BAT for your configuration 
  93. rem *********************************************************************
  94. :bbs
  95. dobbs
  96.  
  97. rem ***************************************************************************
  98. rem Run any pending events (Remove the 'o' if running SBBS v2.1 or earlier)
  99. rem ***********************************************************************
  100. :event
  101. cd %sbbsnode%
  102. call sbbs o
  103. goto top
  104.  
  105. rem ***************************************************************************
  106. rem Received a fax call
  107. rem *******************
  108. :fax
  109. cd \zfax
  110. rcvfax 2 /p:1
  111. if errorlevel 0 echo riIncoming FAX Notification! >> \bbs\data\msgs\0001.msg
  112. goto top
  113.  
  114. rem ***************************************************************************
  115. rem Quit FD
  116. rem *******
  117. :userbreak
  118. echo User Break.
  119. goto end
  120.  
  121. rem ***************************************************************************
  122. rem Mailer error of some kind
  123. rem *************************
  124. :error
  125. echo %fd% ERROR (1-9)
  126. goto end
  127.  
  128. rem ***************************************************************************
  129. rem End of the batch file, so display a blank line for prettiness
  130. rem *************************************************************
  131. :end
  132. rem ***************************************************************************
  133. rem Make node status OFFLINE
  134. rem ************************
  135. %sbbs%\exec\node status=5 %nodenum%
  136. echo.
  137.