?
Solved

Batch halp

Posted on 2004-09-04
12
Medium Priority
?
1,094 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
11 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
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
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 80 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

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

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

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Loops Section Overview
Suggested Courses

864 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