Archive for August, 2007

August 1, 2007

Send mail from the command line

Ever need to send a one-line email from a DOS/CMD batch file? If your PC or Server has .Net 2 installed you can use this application.
It’s straightforward. Place the cmdSendmail.exe in your path or working directory and then type something like this at the command line:-
cmdSendMail you@emailtest.com~you@somewherelse.com~The Subject~The main text of the message~you@somewherelse.com~pass123~mail.somewherelse.com
Usage
cmdSemdMail {command string [...]

August 1, 2007

Two ways to call a URL from a batch

Sometimes it’s useful to extract a web page to a file from a Windows batch.
For example I have a batch file that downloads financial figures every day, processes them and updates a database.
vbcurl http://myfinancialfigures.com/something.php >mydatafile.htm
If you don’t have a copy of Opera handy use a statement like the following to read the source from a [...]