home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / popcl221.zip / popclid.cmd < prev    next >
OS/2 REXX Batch file  |  1994-09-16  |  2KB  |  59 lines

  1. /**********************************************************/
  2. /*  PopCliD.cmd - popclient Daemon                        */
  3. /*  (C) Copyright Claudio Fahey, 1994                     */
  4. /*  e-mail: claudio@uclink.berkeley.edu                   */
  5. /**********************************************************/
  6.  
  7. /*********************************************************/
  8. /* Edit the following lines to configure this program:   */
  9. /*********************************************************/
  10.  
  11. host = 'myhost.berkeley.edu'        /* POP host name                */
  12. loginname = 'myname'                /* Login name on the host       */
  13. password = 'mypass'                 /* Password on the host         */
  14. delay = 120                         /* Seconds between mail checks  */
  15.  
  16. /* If you're using LaMail, modify the INBOX path below as necessary */
  17.  
  18.     mda_path = value('COMSPEC',,'OS2ENVIRONMENT')
  19.     mda_args = '/C LAMAILER.CMD -dest E:\TCPIP\ETC\MAIL -to $u'
  20.  
  21. /* If you're using Ultimedia Mail/2, uncomment the following two 
  22.    lines and modify the INBOX path below as necessary               */
  23. /*
  24.     mda_path = 'UMAILER.EXE'
  25.     mda_args = '-dest E:\TCPIP\UMail\Server\INBOX -to $u'
  26. */
  27.  
  28. /**********************************************************/
  29. /* You should not need to modify anything below this line */
  30. /**********************************************************/
  31.  
  32. signal on halt  /* don't display REXX error message when user breaks out */
  33.  
  34. /* Load RexxUtil for syssleep */
  35. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  36. call SysLoadFuncs
  37.  
  38. /* When mail arrives, popclient runs the mail delivery agent
  39.    specified by MDA_PATH with arguments MDA_ARGS.  This
  40.    sets the environment to the correct MDA                      */
  41. rc = value('MDA_PATH',mda_path,'OS2ENVIRONMENT')
  42. rc = value('MDA_ARGS',mda_args,'OS2ENVIRONMENT')
  43.  
  44. do forever
  45.     '@popclient -u' loginname '-p' password host
  46.  
  47.     /* If there's an error, just beep and continue */
  48.     if rc > 1 then do
  49.         say 'POPCLID.CMD: POPCLIENT.EXE returned error ('rc')'
  50.         call beep 400, 500
  51.         end
  52.  
  53.     /* wait for a specified number of seconds */
  54.     call syssleep delay
  55.     end
  56.  
  57. halt:
  58.  
  59.