Configuring a bat script to send an email

Simple command to send en email to an internal network user within a .bat script
Who is Participating?
Shaun VermaakConnect With a Mentor Technical Specialist/DeveloperCommented:
I use BLAT in my batch files
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)
100questionsAuthor Commented:
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.
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

As of my knowladge there is no way for doing it without using scripting such as powershell.
Gerwin Jansen, EE MVETopic Advisor Commented:
I second blat - as suggested by Shaun - I'm using it as well (no points please).
Bill PrewCommented:
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.

It seems that SHaun Vermaak solution is close enough to what the Author looked for.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.