WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
HowTo... Send an e-mail (Read 3619 times)
Gert
YaBB Administrator
*****
Offline



Posts: 2233
The Netherlands
HowTo... Send an e-mail
Jun 14th, 2003 at 3:01am
 
Note: There is a sample .bat file installed with WatchDirectory (WdAutoEmail.bat)

WatchDirectory has no buildin support to send e-mail.
There are several freeware commandline tools available on the net however...

Just to name one: blat (http://www.interlog.com/~tcharron/blat.html).

The bat-file below assumes you have downloaded blat and it is available in your path.

Furthermore you have told blat the smtp-server and from-name to use (can also be set on the commandline) by entering the following command:
Code:
blat -install smtp.yoursmtpserver.com your-email@address.com
 



You can use the following bat-file to send you the name of new files in a monitored directory:
Code:
goto %WD_REASON%

:FILENEW
echo A new file arrived in the monitored dir    > "C:\TEMP\%WD_FILE_N%.blat"
echo %WD_FILE%    >> "C:\TEMP\%WD_FILE_N%.blat"

blat "c:\temp\%WD_FILE_N%.blat" -to toaddr@mail.com -subject "new file!"
del "C:\TEMP\%WD_FILE_N%.blat"

 

Back to top
« Last Edit: Feb 9th, 2004 at 12:28pm by Gert »  

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1