Computing.Net > Forums > Programming > DOS Variable Help

DOS Variable Help

Reply to Message Icon

Original Message
Name: bismarkcount
Date: July 3, 2007 at 15:17:11 Pacific
Subject: DOS Variable Help
OS: windows xp
CPU/Ram: 1gb
Model/Manufacturer: dell
Comment:

Hello Everybody!

I need some help to figure out this:

i have a .net email applicaction that runs from command prompt, and it attaches a txt file to the email and sends it.

You pass the from, to, subject and body of the email as parameters.

is there a way to read from this textfile (about 4 lines of text though it varies), save the content of the file in a variable and pass the content of this variable as the mail body paremeter??

Example:
i run the application like this:

C:\JLMail from@mail, to@mail, subject, body, "C:\attachment.txt"

so instead of writing this, save the content of the file:

1: failed
2: ok
3: failed

to a variable and type this in the command prompt instead?:

C:\JLMail from@mail, to@mail, subject, body, %variable%


Any Help will be appreciated.
thnx a lot


Report Offensive Message For Removal

Response Number 1
Name: Mechanix2Go
Date: July 3, 2007 at 15:43:56 Pacific
Subject: DOS Variable Help
Reply: (edit)

Since the end of a var is defiled by a line break, I can't see how.

Some command line mailers will let you send a FILE as the body. [As well as attachments.]

Like this one:
===============================
Usage: mailto options
mailto v1.6 Copyright (c) 1998 Scott Beasley
Options are:
-U sender id -D user ids -H smtp_host
[-S subject] [-R Return path]
[-M Message] [-MF Message file name]
[-CC user ids] [-BCC user ids]
[-AB Binary file names] [-AT Text file names]
[-C config file] [-I section name]
[-RC retry count] [-RW seconds to wait between each retry]
[-DEBUG] [-N user id]


=====================================
If at first you don't succeed, you're about average.

M2



Report Offensive Follow Up For Removal

Response Number 2
Name: bismarkcount
Date: July 4, 2007 at 07:06:17 Pacific
Subject: DOS Variable Help
Reply: (edit)

Or maye putting all the lines in a single one, separated by a dash (line1-line2-line3)??

and save that into the variable??

My mailing application has the ability to attach the file to the message, but i want the content of the file in the body because it will be visualized through a mobile phone

thnx a lot


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: DOS Variable Help

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software