
Thank you!
Moderator: DosItHelp
Squashman wrote:Please be more specific and provide examples.
Please read this thread as well.
viewtopic.php?f=3&t=6108
daxxx2706 wrote:I have to send an email to the user XXXXX to your email address using blat
Squashman wrote:daxxx2706 wrote:I have to send an email to the user XXXXX to your email address using blat
I assume you mean: I have to send an email to user XXXXX using blat.
Does the PDF document need to be attached?
Could you please post the code that you use to send a single email using blat and show where the variables would go into the the command.
Code: Select all
blat.exe C:\Script\pdftosend.pdf -to mailto@contoso.com -server 10.0.0.1 -f "emailsender<sender@domain.com>" -subject "Your pdf is here"
Code: Select all
@echo off
FOR %%G IN (C:\script\*.pdf) DO (
FOR /F "tokens=2 delims=_" %%H IN ("%%~nG") DO (
FOR /F "tokens=1,2" delims=," %%I IN (c:\script\address.csv) DO (
IF /I "%%~H"=="%%~I" (
echo blat.exe "%%~G" -to %%~J -server 10.0.0.1 -f "emailsender<sender@domain.com>" -subject "Your pdf is here"
)
)
)
)
pause
Squashman wrote:Untested.
Remove the ECHO before the BLAT.exe command if you are satisfied with the output on the screen.Code: Select all
@echo off
FOR %%G IN (C:\script\*.pdf) DO (
FOR /F "tokens=2 delims=_" %%H IN ("%%~nG") DO (
FOR /F "tokens=1,2" delims=," %%I IN (c:\script\address.csv) DO (
IF /I "%%~H"=="%%~I" (
echo blat.exe "%%~G" -to %%~J -server 10.0.0.1 -f "emailsender<sender@domain.com>" -subject "Your pdf is here"
)
)
)
)
pause