@echo off


:: NOTE NOTE NOTE 

:: To send mail from within lynx

:: You MUST edit the tcpport line below for your smtp mailserver, 
:: i.e. change "mail.foo.net" below to your own smtp mailserver.
:: Then edit mail.cfg for your userid (and optionally host and
:: domainslist).
:: See mail.cfg if you need to activate the HELO protocol

:: OTHER NOTES
:: You must pick (and create if necessary) a directory for your
:: mailing files (X_MAILN.EXE, TCPPORT.EXE, MAIL.CFG, and WATTCP.CFG).
:: Replace references to "f:\mailout" with the full path to the
:: directory. There must be a subdirectory within it named "SPOOL".
:: If you use batch file pushdir/popdir, change pushdir/popdir below to
:: call pushdir/call popdir.

SET OLDWATTCP=%WATTCP.CFG%
SET WATTCP.CFG=f:\mailout
pushdir
f:
pushdir
cd \mailout
gecho "my_ip=%MYIP%" >f:\mailout\path.cfg
gecho "netmask=%NETMASK%" >>f:\mailout\path.cfg
gecho "gateway=%REMIP%" >>f:\mailout\path.cfg
cp %4 .\spool\mail.out
tcpport mail.foo.net 25 x_mailn.exe mail.cfg
popdir
popdir
SET WATTCP.CFG=%OLDWATTCP%
SET OLDWATTCP=


