home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 18
/
aminetcdnumber181997.iso
/
Aminet
/
comm
/
mail
/
YAMscripts.lha
/
YAMmail.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-11-22
|
898b
|
32 lines
/* YAMmail.rexx 1.0 by knikulai@utu.fi
*/
subject='Mail from your web page'
Options Results
parse arg email /* an adress could become useful later...*/
if show('P','YAM')=0 then do /* YAM is not running yet, so let's start it */
address command 'run <>nil: yam:yam nocheck'
i=0
do until show('P','YAM')>0 | i=3 /* Let's not wait more than 30 seconds */
address command 'sys:rexxc/WaitForPort YAM'
i=i+1
end /* do */
if show('P','YAM')=0 then exit
end
/* Now we know YAM is up and running */
njaah=pos('?SUBJECT=',upper(email))
if njaah>0 then do
subject=right(email,length(email)-njaah-8)
email=left(email,njaah-1)
end
address 'YAM' /* The following commands are sent to YAM */
'Show' /* Uniconify */
'MailWrite' /* Press 'Write'-button */
'WriteMailTo "'||email||'"' /* Set address */
'WriteSubject "'||subject||'"' /* Set subject */
exit