admin管理员组

文章数量:1582024

::set name=%date:~0,4%%date:~5,2%%date:~8,2%
::C:\automail\close.bat >>C:\automail\c%name%.log

::1、先下载blat.exe文件,下载地址: https://sourceforge/projects/blat/files/
::2、解压后只需要blat.exe即可,用exe 路径供脚本调用 ;

set name=%date:~0,4%%date:~5,2%%date:~8,2%
set namet=%time:~0,2%%time:~3,2%%time:~6,2%

rem ----邮件主题----
set s="%name%  %namet%  电脑关机 "
rem ----邮件内容-----
set body="%name%  %time%  %computername% 电脑关机."
rem ----收件邮箱-----
set t=843321780@qq
rem ----发件邮箱-----
set f=843321780@qq
rem ----邮箱秘钥-----
set pw=jzsxilytegtkbecj
rem ----执行发送-----
C:\autoemail\blat3222\full\blat.exe -body %body% -s %s% -t %t% -server smtp.qq -f %f% -u %f% -pw %pw%

最后一行,配置为blat.exe 的路径。上述bat 文本可放在任意位置。

然后配置生效:

1.开始——运行——gpedit.msc
2.策略——计算机配置——Windows设置——脚本(启动/关机)
3.右击"关机"
4.添加——浏览:选择脚本确定;
5.完成设置,重启测试。

本文标签: 发送邮件win