Solved

Batch halp

Posted on 2004-09-04
12
1,034 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
 
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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:DanCh99
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now