Rob van der Woude's Scripting Pages

Solutions found in alt.msdos.batch

and alt.msdos.batch.nt

Batch generated e-mail messages


This question shows an interesting possibility, batch files generating e-mail:

I am trying to make a simple script which will launch the default email
program, and automatically input the email address, the subject and the
message. I already have a script that does the first address and subject but
I can't seem to get the message to work. here is what I have so far:


This works, but then I try to add the following (which works in HTML):


....and it doesn't work. Can this be done with a batch file?

Spanks in advance.


By preceding the ampersand ( & ) with a caret ( ^ ) and the spaces by %%20 short one liners can be sent by NT batch files.
I didn't test this yet, but I think Windows 95/98 won't even need the caret before the ampersand.
Our batch file might look like this (NT):

START mailto:admin@stderr.nul?subject=Errorˆ&body=Returncode%%20%errorlevel%%%20was%%20returned%%20by%%20the%%20backup%%20program.


More info on batch generated e-mail on my e-mail page.

page last modified: 2016-09-19; loaded in 0.0078 seconds