@ECHO OFF
START mailto:bharanikumariyer@gmail.com?subject=Errorˆ&body=Returncode%%20%errorlevel%%%20was%%20returned%%20by%%20the%%20backup%%20program.
I’m trying to send email with the code above, but it starts up Outlook. How can I send email without Outlook using just batch code? The destination address can be hardcoded in the script.
You need a command line email program to use in the batch file – you have to have some application that can do the mail send for you within that context, outlook needs to be actually running to send.
These exist – they’ve been around for a long long time for use in the same sort of context as you’ve got – but its not something I’ve ever needed. You may have more success in serverfault.com (by asking for a command line email utility to use to send mail from a batch file).