home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / m / mailcheck / !MailCheck / Scripts / Example
Encoding:
Text File  |  1997-02-06  |  792 b   |  23 lines

  1. # Log into a host to read email
  2.  
  3. # If you're not happy keeping your password in a file on your hard disk, then
  4. # delete all the lines between, but not including, "sendl "userid"" and
  5. # "sessionend". (In this case, you won't be able to start your mailreader
  6. # automatically.)
  7.  
  8. # "host" is the name of the machine to log in to
  9. session telnet host
  10. # "ogin:" is the end of the prompt for the user id (normally "login:")
  11. waitfor "ogin:"
  12. # at the "login:" prompt, the user id is sent
  13. sendl "userid"
  14. # "assword:" is the end of the prompt for the password (usually "password:")
  15. waitfor "assword:"
  16. # send the password "xxxx"
  17. sendl "xxxx"
  18. # now wait for the command-line prompt (often ends in "$" or "%")
  19. waitfor "$"
  20. # send a command to start a mail reader e.g. "pine" or "elm"
  21. sendl "pine"
  22. sessionend
  23.