Skip to content

Instantly share code, notes, and snippets.

@luhaoming
Created October 18, 2017 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luhaoming/bd03b1eeb4b10e03223f47842974c48a to your computer and use it in GitHub Desktop.
Save luhaoming/bd03b1eeb4b10e03223f47842974c48a to your computer and use it in GitHub Desktop.
bootnotice at windows
@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