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:

start mailto:innovation@3m.com?subject=Adjustable_Keyboard_Trays

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

start
mailto:innovation@3m.com?subject=Adjustable_Keyboard_Trays&body=myMessageHer
e

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

Spanks in advance.

bipple

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):

@ECHO OFF
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.0014 seconds