Send Email from a .bat script( 1 Vote )
In MS Exchange environment I used this method to send emails from batch jobs to internal email addresses. If you want to use this to send messages to external recipients you may need to configure Exchange relay options. Some additional info here.
An example of using mailsend.exe:
- Place mailsend1.16.exe in any folder
- In the same folder create send.bat file.
- Place following command in send.bat (obviously changing domain, server IP address, and other details to match your environment)
- Run send.bat to send your email
- If you having any issues add switch -v to enable verbose mode
- If you want to add an attachment add -attach "image.jpg",a where image.jpg file name of your attachment.
Windows Server 2003
Subscribe to receive occasional updates on new posts.