Link to home
Start Free TrialLog in
Avatar of E=mc2
E=mc2Flag for Canada

asked on

Configuring a bat script to send an email

Simple command to send en email to an internal network user within a .bat script
Avatar of zvitam
zvitam
Flag of Israel image

You can do it relative easily using powershell:

look at the following article How to Send Email From the Command Line in Windows (Without Extra Software)
Avatar of E=mc2

ASKER

Thank you.  I was hoping to do this directly in the .bat file without having to employ Powershell or VBS or any other scripting, but directly in the .bat file.
As of my knowladge there is no way for doing it without using scripting such as powershell.
ASKER CERTIFIED SOLUTION
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

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
I second blat - as suggested by Shaun - I'm using it as well (no points please).
Avatar of Bill Prew
Bill Prew

There is no way to do this just in native DOS commands in a BAT file, sorry.  You either need to use some other scripting language (I often execute a small VBS script from the BAT script) or use a utility like BLAT to do the mail sending.  There are a small handful of these command line email utilities, if you are interested in those search around previously answered questions on this site.  If you can't find them let me know I'll point you towards some.  But I don't want to go too far if you can't use either utility or other scripting languages.


»bp
It seems that SHaun Vermaak solution is close enough to what the Author looked for.