Link to home
Start Free TrialLog in
Avatar of shanekelly_7
shanekelly_7Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Batch halp

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.
Avatar of Zyloch
Zyloch
Flag of United States of America image

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
Avatar of shanekelly_7

ASKER

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.
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 :)
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 ?
there very well many be a dos-based smtp program.  But I'm not familiar with any.
Avatar of Frater_VI
Frater_VI

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
ASKER CERTIFIED SOLUTION
Avatar of Frater_VI
Frater_VI

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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>

We probably overwhelmed him with too much info :) but whatever you decide will be fine with me.