|hello genius pips especially to Ivo. I hope everything is well with you. |
Anyways, I would like to ask, is it possible in windows batch file that the program will choose what file to be attached in email. I'm using this code for sending email in batch (courtesy of Ivo)
I would like to achieve this:
Scenario is, the program is testing the content of %file% if it's equal to 0 or not. So
FOR /F "eol= tokens=* delims= usebackq" %%A in (%file%) do (
if "%%A" NEQ "0" (
) else (
do some command
SendEmail2 and SendEmail basically have the same content. But I would like them to be separated because of email subject and file attachment. So I would like them to be called if the statement involving them is true.
Can you also tell if the email configuration can be set as a variable so I can make my coding neater? I'm actually using the same configuration in all my programs and I have to declare them on every file. Any response from you guys will be very much appreciated. Thanks as always!