Security Forums
Log in
FAQ
| Search
| Usergroups
| Profile
| Register
| RSS
| Posting Guidelines
| Recent Posts
View previous topic :: View next topic
Author
Message
TheKingster Link Spammer Joined: 03 May 2002 Posts: 0 Location: UK
Posted: Thu Jan 16, 2003 11:24 am Post subject: Sending Mail in a Batch File
Does anyone know if there is anyway to send an e-mail via a batch file?
You cant use SMTP commands as its in a session as soon as you telnet.
Is there any other way?
Back to top
ShaolinTiger Forum Fanatic Joined: 18 Apr 2002 Posts: 16777215 Location: Kuala Lumpur, Malaysia
Posted: Thu Jan 16, 2003 11:39 am Post subject:
This has been discussed in the forum at least 3 times
Use blat
Back to top
TheKingster Link Spammer Joined: 03 May 2002 Posts: 0 Location: UK
Posted: Thu Jan 16, 2003 1:07 pm Post subject:
Got a few brownie points for this:
Code:
@echo off
REM Batch file by Dave King to ensure ********* services are ok.
REM Please do not delete this file or remove from scheduled tasks!
@echo This mail has been sent to you because some of the Spaceseeker services needed starting > C:\Logfile.log
@echo. >> C:\Spaceseeker.log
REM Starting Publishing service
net start "FTP Publishing service" >> C:\Logfile.log
REM Starting IIS Admin Service
net start "IIS Admin Service" >> C:\Logfile.log
REM starting SMTP Service
net start "Microsoft SMTP service" >> C:\Logfile.log
REM Starting WWW Publishing service
net start "World Wide Web Publishing Service" >> C:\Logfile.log
REM Check if email needs to be sent
find "service is starting" c:\Logfile.log > nul
if errorlevel 1 goto end
REM Send mail
if exist %systemroot%\blat.exe blat -install smtp.btclick.com email@emaildomain.co.uk
if exist %systemroot%\blat.exe blat c:\Logfile.log -t email@emaildomain.co.uk
:end
Of course I have amended the to address and SMTP server for this post, these are not actually the ones I am using.
You may think it looks very simple and doesn't actually do much, but is very effective, which is what counts.
Thanks Shaolin for the pointer to blat.
Back to top
ThePsyko SF Mod Joined: 17 Oct 2002 Posts: 16777178 Location: California
Posted: Thu Jan 16, 2003 5:37 pm Post subject:
postie! postie! postie!
One of these days ST and I are going to have to have a CL mail-off
blat vs postie
Back to top
ShaolinTiger Forum Fanatic Joined: 18 Apr 2002 Posts: 16777215 Location: Kuala Lumpur, Malaysia
Posted: Thu Jan 16, 2003 5:53 pm Post subject:
LOL
Don't make me b0mb0r j00!
SpankTP.bat..
Code:
:0WN3D
ECHO Hehe
blat d0nkeypr0n.mpg -t tp@prozac.com
goto 0WN3D-2
:0WN3D-2
ECHO Oops infinite loop.
blat d0nkeypr0n.mpg -t tp@prozac.com
goto 0WN3D
Back to top
ThePsyko SF Mod Joined: 17 Oct 2002 Posts: 16777178 Location: California
Posted: Fri Jan 17, 2003 9:38 pm Post subject:
heh.. you'd be b0mb0ring j00rself - that email account only has a 500Kb size limit before it starts bouncing... I'll never see teh d0nkey pr0n
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum