Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: how to send mail from windows command prompt?[Scanned]
Use blat
http://www.interlog.com/~tcharron/blat.html
using blat is as simple as copying the exe to the windows system folder install as
blat -install yourmailserver bmetelsky_at_cps92.com 5 25
then call as shown below
here is an example of blat used in a script
####################################
@echo off
set theip=299.69.89.999
set theapp=Internet Connection Monitor
set dbamail=bob_at_cps92.com
set badmessage=The %theip% is NOT AVAILABLE at %date% at %time%
title %theapp% is pinging %theip% to verify it is up
:: echo >C:\connection.txt
:begin
ping -a %theip%| FIND "TTL" >>C:\connection.txt
IF ERRORLEVEL 1 GOTO :email
sleep 10
GOTO begin
:email
blat C:\connection.txt -subject " Internet connection is down at
%date% at %time%" -to %dbamail% -i "%theip%_at_cps92.com" -body
"%otherbadmessage%" >>C:\connection.txt
GOTO begin
######################################################
HTH ! Bob
Hello All:
I have setup some scripts that would export the db every day. Instead of
looking through the logs manually every morning, is there a way to tail
(windoze equivalent?) the file and send and email (mailx equivalent on
windows?) I know this can be implemented in Perl, but I don't know perl
so I
am looking for help on Windoze...PLEASE!
I really appreciate your help in this matter.
Thanks,
Murali.
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: Murali_Pavuloori/Claritas_at_claritas.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Paulo Gomes INET: PGomes_at_Datinfor.pt Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-LReceived on Fri Oct 03 2003 - 09:00:48 CDT
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Bob Metelsky INET: bmetelsky_at_cps92.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).