Computing.Net > Forums > Programming > DOS Variable Help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

DOS Variable Help

Reply to Message Icon

Name: bismarkcount
Date: July 3, 2007 at 15:17:11 Pacific
OS: windows xp
CPU/Ram: 1gb
Product: 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



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: July 3, 2007 at 15:43:56 Pacific
Reply:

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



0

Response Number 2
Name: bismarkcount
Date: July 4, 2007 at 07:06:17 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: DOS Variable Help

Create DOS variable - VBS www.computing.net/answers/programming/create-dos-variable-vbs/16905.html

Need Good DOS users help! www.computing.net/answers/programming/need-good-dos-users-help/8552.html

DOS variables batch file www.computing.net/answers/programming/dos-variables-batch-file/10346.html