Solved

Batch halp

Posted on 2004-09-04
12
1,058 Views
Last Modified: 2008-01-09
How Can I send A E-mail over A batch file? I can't use outlook because it is corrupt and
"Start mailto:<to>?subject=<subject>^&body=<body>"
Dosent send mail it only writes it.
0
Comment
Question by:shanekelly_7
  • 3
  • 3
  • 2
  • +2
12 Comments
 
LVL 36

Expert Comment

by:Zyloch
ID: 11979311
Hi

You can have a program like this: http://www.exclamationsoft.com/exclamationsoft/netmailbot/default.asp

Then, if you want, you can create a batch file using those commands.

Regards,
Zyloch
0
 
LVL 1

Author Comment

by:shanekelly_7
ID: 11979352
I can't connect to the link, But one of the problems is cant want a batch that will work on all computers on my network (all windows xp) and my network will not allow anyone to download programs.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 11979373
Hmm, looks like the links isn't working right now--it was before. Creating these sorts of batch files is beyond my experience, so just hang tight and wait for someone :)
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 15

Expert Comment

by:adamdrayer
ID: 11980606
0
 
LVL 1

Author Comment

by:shanekelly_7
ID: 11983531
If you can not login telnet via batch script is there a trick you can do with the URL so that : "Start mailto:<to>?subject=<subject>^&body=<body>" Would make the email, but is there some thing you could do to send it ?
0
 
LVL 15

Expert Comment

by:adamdrayer
ID: 11985244
there very well many be a dos-based smtp program.  But I'm not familiar with any.
0
 

Expert Comment

by:Frater_VI
ID: 12001903
I did some poking around and everything I found referencing a batchfile generated email required the use of an email client such as outlook express or a command line emailer like Blat, GBMailer or Mailsend

Blat can be obtained from http://sourceforge.net/projects/blat
GBMailer can be found here http://www.gboban.com/
Mailsend is here http://www.mailsend-online.com/

Of the three, Blat is the only one that is free.

-Frat
0
 

Accepted Solution

by:
Frater_VI earned 20 total points
ID: 12001949
I found this on another forum  May help this is a copy of someone elses batch file for an application called - osusmtp

@echo off
setlocal
set SMTPSERVER=mail.domain.com
set FROMEMAIL=from@domain.com
set TOEMAIL=to@domain.com
set SUBJECT="Subject line"
set BODYMSG="Test in body "
set MAINDIR=c:\filedir
set COPYDIR=%MAINDIR%

:: Get current date.
for /f "tokens=1-4 delims=/ " %%i in ('date/t') do (

set DATE=%%l%%j%%k)

mkdir %COPYDIR%\%DATE%
xcopy /Y %MAINDIR%\*.* %COPYDIR%\%DATE%

for /f "tokens=1" %%i in ('DIR /A-D /O-D /B c:\filedir') do (set ATTACHMENT=%%i)

mailer.exe /zl %SMTPSERVER% /zt %TOEMAIL% /zf %FROMEMAIL% /zs %SUBJECT% /zb %ATTACHMENT% /zat %ATTACHMENT%;

del %ATTACHMENT%

The Discussion can be found at - http://www.computing.net/dos/wwwboard/forum/13786.html
OSUSMTP can be found here - http://oregonstate.edu/~reeset/html/other/smtp.html

Good Luck

-Frat
0
 
LVL 23

Expert Comment

by:Danny Child
ID: 12018746
bmail has worked well for me:
http://www.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm
if you can download it from any pc, you could move it to your network on a floppy

in a batch file:
For /f "Tokens=*" %%a in (EmailAddresses.txt) do cmd /c bmail -s <ExchangeServerName> -t %%a -f <SenderAddress> -h -a "Message Subject" -b "Message Body"

the above is all one line, and sends an email to every address in EmailAddresses.txt
Rreplace anything in < > with the obvious.  

hmmm, why are you sending email from the command line in an environment where you can't do downloads <wink>

0
 

Expert Comment

by:Frater_VI
ID: 12243822
We probably overwhelmed him with too much info :) but whatever you decide will be fine with me.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12243996
Well, he/she's into some serious scripting: http://www.experts-exchange.com/Operating_Systems/Q_21138103.html
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question