home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / echobeta.zip / MAILER.BAT < prev    next >
DOS Batch File  |  1995-04-14  |  5KB  |  118 lines

  1. @echo off
  2. rem ***************************************************************************
  3. rem MAILER.BAT file for use with FrontDoor and Synchronet BBS v1c
  4. rem if using with InterMail, change all "FD"s to "IM"s.
  5. rem ***************************************************************************
  6.  
  7. rem ***********
  8. rem Node Number 
  9. rem ***********
  10. set nodenum=1
  11. rem **************
  12. rem SBBS Directory 
  13. rem **************
  14. set sbbs=c:\sbbs
  15. rem ***************************************
  16. rem SBBS CTRL Dir - needed for NODE utility
  17. rem ***************************************
  18. set sbbsctrl=%sbbs%\ctrl
  19. rem **************************************************
  20. rem SBBS NODE Dir - needed for ADDFILES utility (tick)
  21. rem **************************************************
  22. set sbbsnode=%sbbs%\node1
  23.  
  24. :top
  25. rem ***************************************************************************
  26. rem Set Node status to WAITING FOR CALL
  27. rem ***************************************************************************
  28. %sbbs%\exec\node status=0 %nodenum% rerun off %nodenum% event off %nodenum%
  29.  
  30. rem ***************************************************************************
  31. rem Drive letter where FrontDoor is installed 
  32. rem ***************************************************************************
  33. c:
  34. rem ***************************************************************************
  35. rem FrontDoor system directory 
  36. rem ***************************************************************************
  37. cd \fd
  38. fd
  39. rem ***************************************************************************
  40. rem These error levels must be set in FDSETUP!
  41. rem ***************************************************************************
  42. if errorlevel 200 goto fax
  43. if errorlevel 100 goto bbs
  44. if errorlevel  50 goto inmail
  45. if errorlevel  25 goto outmail
  46. if errorlevel  10 goto userbreak
  47. if errorlevel   1 goto error
  48. goto end
  49.  
  50. rem ***************************************************************************
  51. rem FrontDoor received in-bound mail from another system 
  52. rem ***************************************************************************
  53. :inmail
  54. echo Importing in-bound mail!!!
  55. rem ***************************************************************************
  56. rem Set node status to NETWORKING
  57. rem ***************************************************************************
  58. %sbbs%\exec\node status=6 %nodenum%
  59. %sbbs%\exec\sbbsecho /esl!
  60. goto top
  61.  
  62. rem ***************************************************************************
  63. rem Semaphore file (FDEXIT.025) was signaled by the BBS - new out-boud messages
  64. rem ***************************************************************************
  65. :outmail
  66. echo Exporting out-bound mail!!!
  67. rem ***************************************************************************
  68. rem Set node status to NETWORKING
  69. rem ***************************************************************************
  70. %sbbs%\exec\node status=6 %nodenum%
  71. %sbbs%\exec\sbbsecho /nil
  72. rem ***************************************************************************
  73. rem Signal the rescan semaphore so that FD will rescan the netmail folder
  74. rem ***************************************************************************
  75. rem > fdrescan.now
  76. goto top
  77.  
  78. rem ***************************************************************************
  79. rem Received a call from a user wanting access to the BBS - how dare they!
  80. rem This actually executes EXEBBS.BAT with the proper switches for SBBS
  81. rem You will probably also need to edit EXEBBS.BAT for your configuration 
  82. rem ***************************************************************************
  83. :bbs
  84. dobbs
  85.  
  86. rem ***************************************************************************
  87. rem Received a fax call
  88. rem ***************************************************************************
  89. :fax
  90. cd \zfax
  91. rcvfax 2 /p:1
  92. if errorlevel 0 echo riIncoming FAX Notification! >> \bbs\data\msgs\0001.msg
  93. goto top
  94.  
  95. rem ***************************************************************************
  96. rem Quit FD
  97. rem ***************************************************************************
  98. :userbreak
  99. echo User Break.
  100. goto end
  101.  
  102. rem ***************************************************************************
  103. rem FrontDoor error of some kind
  104. rem ***************************************************************************
  105. :error
  106. echo FD ERROR (1-9)
  107. goto end
  108.  
  109. rem ***************************************************************************
  110. rem End of the batch file, so display a blank line for prettiness
  111. rem ***************************************************************************
  112. :end
  113. rem ***************************************************************************
  114. rem Make node status OFFLINE
  115. rem ***************************************************************************
  116. %sbbs%\exec\node status=5 %nodenum%
  117. echo.
  118.