Created
October 18, 2017 01:51
-
-
Save luhaoming/bd03b1eeb4b10e03223f47842974c48a to your computer and use it in GitHub Desktop.
bootnotice at windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
::boot notice | |
:: change these setting | |
set uid=yourname@gmail.com | |
set upw=yourpass | |
set from=yourname@gmail.com | |
set to=yourname@gmail.com | |
set title="Boot Notice" | |
set emailclient="D:\tasks\sendEmail.exe" | |
:: dont change these setting | |
set smtp=smtp.gmail.com:587 | |
FOR /F "usebackq" %%i IN (`hostname`) DO SET host=%%i | |
set msg="%host% at %date% %time%" | |
::start email | |
%emailclient% -f %from% -s %smtp% -xu %uid% -xp %upw% -t %to% -u %title% -o message-charset=big5 -m %msg% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment