/* A VERY simple AutoGetMail for AmiTCP and Thor
** USAGE: rx autogetmail [nodial]
** If someone would like to write a better one, please do and
** send it to me. I will include it in the next release of EZCron.
** Change the ThorMailBox variable to reflect the name of YOUR Thor system.
** Change the ms (mailserver) and ns (newsserver) vars accordingly.
** This script will execute startnet and will dial by default
** You MUST use the nodial option if you are already online
*/

	arg dial .
	
	ThorMailBox = 'mymail'
	ms = 	'news.iolinc.net'			/* MAIL SERVER */
	ns =	'news.shasta.com'
/*	ns = 	'207.70.214.200'			/* NEWS SERVER */*/

	if dial ~= nodial then do
		address command 'amitcp:bin/stopnet'    /*Takes AmiTCP offline*/
		call delay(500)
		address command 'amitcp:bin/startnet'   /*Puts AmiTCP online*/
	end

	OPTIONS FAILAT 21

	address command 'thor:bin/sendtcp' ThorMailBox 'mailserver='ms 'newsserver='ns 'pubscreen workbench'
	address command 'thor:bin/gettcp' ThorMailBox 'NONEWS pubscreen workbench'
	address command 'thor:bin/gettcp' ThorMailBox 'NOMAIL pubscreen workbench'

	OPTIONS NO

	if dial ~= nodial then address command 'amitcp:bin/stopnet'    /*Takes AmiTCP offline*/
