home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / mr2i201.zip / TESTMAIL.CCC < prev    next >
Text File  |  1996-04-10  |  1KB  |  55 lines

  1. /*
  2.     MR/2 ICE - TESTMAIL.CMD
  3.  
  4.     Copyright (c) 1996, Nick Knight
  5.     All Rights Reserved.
  6.  
  7.     Author:     Nick Knight
  8.     Created:    04/08/96
  9.     Usage:        maillist addressFile MessageFile
  10.     Purpose:    
  11.  
  12.     US Mail:    Nick Knight, PO Box 22366, Beachwood, Ohio 44122
  13.     Fidonet:    1:157/2 or 1:/157/200
  14.     Internet:    nick@secant.com
  15.     Compuserve: 76066,1240
  16.     BBS:        Private messages on Nerd's Nook (216) 356-1772 or 1872
  17. */
  18.  
  19.  
  20. call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
  21. call SysLoadFuncs
  22.  
  23. '@echo off'
  24. parse arg msg_filename
  25.  
  26. status = stream(msg_filename,'c','open read')
  27.  
  28. subject = ''
  29. value = ''
  30.  
  31. fHeader = 1
  32. ctr = 0
  33. do while ((ctr < 100) & (lines(msg_filename) > 0))
  34.     iline = linein(msg_filename)
  35.     Parse VALUE iline with tag ': ' value
  36.     Parse UPPER VALUE iline with tag ': '
  37.     
  38.     if (tag == 'SUBJECT') then do
  39.         subject = value
  40.         ctr = 101
  41.     end
  42.  
  43.     ctr = ctr + 1
  44. end
  45.  
  46. status = stream(msg_filename,'c','close')
  47.  
  48. PARSE UPPER value subject with subject .
  49.  
  50. if (subject == 'REXX') then
  51.     rc = lineout('mr2_rexx.$$$','OK')
  52.  
  53. return 0
  54.  
  55.