Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hej!
i am new at dos batch files, so i need your help to notice what i am doing wrong.
I have built a .NET program called JLMail which can send mail from command line, so i can execute from cmd prompt by typing:
JLMail from@mail, to@mail, Subject, message, cc@mail.com, att1
so i am using a batch file to execute and send mail to all the people in my mailing list (Mailinglist.txt), here is the code:
::@echo off
FOR /f %%X IN (Mailinglist.txt) DO (
SET mailstring ="JLMail noreply@JLMail.com,"%%X",Subject,message,cc@mail.com,attachment.xls"
ECHO %mailstring%
)
I want to print my resulting string to screen so that i could see if the string is well formed and ready to execute, but just cant get it.could you please help me to see what went wrong?

So what DOES it echo?
=====================================
If at first you don't succeed, you're about average.M2

i just want it to echo the string that i am going to execute, so i can know if the string is properly formed.
the output of the echo should be:
JLMail.com from@mail.com,to@mail.com,Subject, message,cc@mail.com,attachment.xls
and this whole string is the one that will use the JLMail application to send the mail.
The problem is that when i am echoing mailstring it gives me 0.
thnx a lot M2

FOR /f %%X IN (Mailinglist.txt) DO @ECHO JLMail noreply@JLMail.com,"%%X",Subject,message,cc@mail.com,attachment.xls

![]() |
![]() |
![]() |

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