VBS 编写
For I=1 To POP3.Count '搜索全部邮件
Subject=POP3.Messages.Item(I).Subject
FromAddress=POP3.Messages.Item(I).From
ifStrComp(FromAddress,"xxxx@gmail.com")=0then
'xxxx@gmail.com为发送关机命令的邮箱,邮件主题为shutdown
POP3.DeleteSingleMessage(I)
wshshell.run "shutdown -s -t0"
wscript.quit
end if
end if
Next
POP3.Disconnect
准备工作:安装Jmail组件 4.3 4.4 4.5 几个版本的 不要选择free版,不支持pop3收邮件,pro版可以。
不要担心,看这里。 http://vdisk.weibo.com/s/Efrycd9suZYk
当当当。上代码。
do while true
Set POP3=CreateObject("JMail.POP3")
Setwshshell=wscript.createobject("wscript.shell")
wscript.sleep 2000
POP3.Connect "账户","密码","邮箱服务器" '接收关机命令的邮箱账号,密码,以及对应服务器。
if StrComp(Subject,"shutdown")=0 then
loop
够简单了,懒人必备。
没有网的电脑,还是自己拿个棍儿戳吧。
高端操作系统(Linux,mac etc)自行绕过。
抄送 某 @不二坨 看书去!!!