Skip to content

Instantly share code, notes, and snippets.

@masakiplus masakiplus/exec.bat
Last active Aug 29, 2015

Embed
What would you like to do?
auto mail sender
@echo off
rem smail.exe installation required
set pdfpath=%1
set smailpath="exeplace"
set smtp=smtp.gmail.com
set from=hoge@gmail.com
set to="hoge@gmail.com"
for /f "delims=;" %%i in ('dir /b /od %pdfpath%\*.pdf') do (
echo PDFfile: %%i
%smailpath%smail.exe -d -h%smtp% -f%from% -sScan:%%i %to% -a%pdfpath%\%%i
echo %%i was sent to %to%
del %pdfpath%\%%i /Q
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.