home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Extra 1997 #5
/
AmigaPlus_Extra-CD_5-97.iso
/
online-tools
/
mail
/
netmail
/
drivers
/
getmail.mailget
< prev
next >
Wrap
Text File
|
1995-09-30
|
1KB
|
36 lines
/*
** $VER: GetMail.mailget 1.4 (30.9.95)
** Copyright (c) 1995 Riccardo Solmi
**
*/
OPTIONS RESULTS
OPTIONS FAILAT 21
PARSE ARG email, user, pwd, host, mbox, flags
flags = UPPER(flags)
IF user = "" | pwd = "" | host = "" | email = "" | mbox = "" THEN RETURN 1
cmd = 'AmiTCP:bin/GetMail'
IF ~EXISTS(cmd) THEN DO
cmd = GetVar('NetMail/GetMailCmd')
IF cmd = 0 | ~EXISTS(cmd) THEN DO
ADDRESS COMMAND 'SetEnv NetMail/GetMailCmd `Which "GetMail"`'
cmd = GetVar('NetMail/GetMailCmd')
IF cmd = 0 THEN DO
ADDRESS COMMAND 'SetEnv NetMail/GetMailCmd `RequestFile Title "Select GetMail command" Noicons`'
cmd = GetVar('NetMail/GetMailCmd')
IF cmd = 0 | ~EXISTS(cmd) THEN RETURN 2
ADDRESS COMMAND 'Copy QUIET ENV:NetMail/GetMailCmd ENVARC:NetMail/GetMailCmd'
END
END
END
parms1 = 'USER' user 'PASS' pwd 'POPHOST' host
parms2 = 'EMAILADDR' email 'HOME "'PATHPART(mbox)'" MAIL "'FILEPART(mbox)'"'
IF INDEX(flags, 'LEAVE') = 0 THEN parms2 = parms2 'DELETE'
ADDRESS COMMAND '"'cmd'"' parms1 parms2
IF RC = 5 THEN RC = 0
RETURN RC