#27 How to replace parameter in body-file?

open
nobody
None
5
2005-09-23
2005-09-23
Anonymous
No

I would like to replace some variables in bodytext.txt
during the send-process.

Example of my bodytext.txt:

Actually, you have %number% files bigger then %size%
on your %drive%.

In a batchfile I would start BLAT like this:

set number=5
set size=20MB
set drive=H:\MySpace

blat bodytext.txt -server ......

Blat should send the message-body like this:

Actually, you have 5 files bigger then 20MB on your
H:\MySpace.

How can I do that?

Discussion

  • Logged In: NO

    Blat cannot do this, it does not make any attempt to parse
    your message body. What you can do is define your body text
    as command line text instead of using a file, then your
    batch file will be able to automatically change the %
    variables based on environment variable values.

    Blat - -body "Actually, you have %number% files bigger then
    %size%
    on your %drive%." -s "Subject line" -t "emailaddress"

    --
    Chip