home *** CD-ROM | disk | FTP | other *** search
- /* mail.frx
- * Copyright © 1997 Nils Bandener
- * Partly based on example ARexx scripts from various mail programs:
- * - VOYAGERmail.rexx © 1996 Marcel Beck
- * $VER: mail.frx 6.2 (20.10.97)
- */
-
- /* Well, it currently supports only one mail program, namely YAM.
- * YAM is the only program I have found so far, that supports the
- * neccessary ARexx commands. Thor may support these too, but somehow
- * I did not get it to work.
- *
- * Feel free to modify this script to suit your own needs (or mail
- * program ;) . It would be nice if you send me a copy of your script
- * that I can add support for the mail program to this script
- */
-
- scriptname = "Mail"
-
- fieldname = "eMail"
-
- Options Results
-
- fiasco_port = address()
-
- Signal on Syntax
- Signal on Halt
- Signal on Break_C
- Signal on Failure
-
- LockGUI
-
- GetField fieldname "var addr"
-
- if ~show("p", "YAM") then
- do
- Address Command
-
- "RUN >NIL: YAM:YAM NOCHECK"
- "SYS:REXXC/WAITFORPORT YAM"
- end
-
- if show("p", "YAM") then
- do
- Address YAM
- MailWrite
- WriteMailTo addr
- end
-
- bail_out:
-
- Interpret Address fiasco_port
-
- UnlockGUI
- ResetStatus
-
- exit
-
- syntax:
- failure:
-
- if show("Ports", fiasco_port) then
- do
- Interpret Address fiasco_port
-
- RequestChoice '"Error ' || rc || ' in line ' || sigl || ':*n' || errortext(rc) || '" "Cancel" Title "' || scriptname || '"'
- end
- else
- do
- say "Error" rc "in line" sigl ":" errortext(rc)
- say "Enter to continue"
- pull dummy
- end
-
- call bail_out
-
- halt:
- break_c:
-
- if show("Ports", fiasco_port) then
- do
- Interpret Address fiasco_port
-
- RequestChoice '"Script Abort Requested" "Abort Script" Title "' || scriptname || '"'
-
- end
- else
- do
- say "*** Break"
- say "Enter to continue"
- pull dummy
- end
-
- call bail_out
-
-
-