home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The AGA Experience 2
/
agavol2.iso
/
software
/
utilities
/
comms
/
yam1.0
/
rexx
/
sendamail.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1996-02-14
|
818b
|
34 lines
/* sendamail.rexx - send email from AMosaic using YAM
Installation:
Copy SendAMail.rexx to S:
Protect S:SendAMail.rexx +s
Add the line 'sendmail S:SendAMail.rexx' to ENV:mosaic/prefs
*/
tmpfile = 'T:SendAMail.tmp'
IF ~SHOW('Ports','YAM') THEN DO
ADDRESS 'COMMAND'
'Run YAM:YAM NOCHECK HIDE'
'SYS:RexxC/WaitForPort YAM'
END
IF SHOW('Ports','YAM') THEN DO
IF OPEN(out,tmpfile,'write') THEN DO
line = READLN(STDIN); PARSE VAR line 'To: 'rcpt
line = READLN(STDIN); PARSE VAR line 'Subject: 'subj
CALL READLN(STDIN)
CALL READLN(STDIN)
DO WHILE ~EOF(STDIN)
CALL WRITELN(out,READLN(STDIN))
END
CALL CLOSE(out)
ADDRESS 'YAM'
WriteMailTo rcpt
WriteSubject subj
WriteLetter tmpfile
WriteSend
ADDRESS COMMAND 'Delete >NIL: 'tmpfile
END
END