根据——获取公网IP调用邮件控件实现邮件的自动发送到指定邮箱,可直接使用复制使用
提醒error resume 其次 set ie=CreateObject (“internetexplorer.application”) ie.navigate (“http://ip.cn/? ie.Visible=False While ie.busy 或是ie.readystate & lt;在4 行 Set regEx =, New RegExp regEx.Pattern =, "{联通|移动|电信}” Set Matches =, regEx.Execute (ie.document.body.innerhtml) For Each  Match 拷贝;匹配 COSP=Match.Value 下一个 Sub EchoMsg (str) Wscript.Echo str 最终获得子 提醒error resume next set ie=CreateObject (“internetexplorer.application”) ie.navigate (“http://ip.cn/? ie.Visible=False While ie.busy 或是ie.readystate & lt;在4 行 Set regEx =, New RegExp regEx.Pattern =, "来自。*”,COSP&“ Set Matches =, regEx.Execute (ie.document.body.innerhtml) ie.quit For Each  Match 拷贝;匹配 从=Match.Value '定义标题定义为形式 下一个 Set ws =, CreateObject (“Wscript.Shell”), ws.run “% %,全路径名/c @echo ”,从amp;”,在C: \ windows \ systemct.org”, vbhide Sub EchoMsg (str) Wscript.Echo str 最终获得子 “- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 提醒error resume next set ie=CreateObject (“internetexplorer.application”) ie.navigate (“http://ip.cn/? ie.Visible=False While ie.busy 或是ie.readystate & lt;在4 行 Set regEx =New RegExp regEx.Pattern =" \ d。* \ d” Set Matches =, regEx.Execute (ie.document.body.innerhtml) ie.quit For Each  Match 拷贝;匹配 RetStr=匹配。价值”获取公网IP定义变量为RetStr 下一个 Set ws =, CreateObject (“Wscript.Shell”), ws.run “% %,全路径名/c @echo 公IP:“, RetStr&”,在祝辞,C: \ windows \ systemct.org”, vbhide Sub EchoMsg (str) Wscript.Echo str 最终获得子 “杀死浏览器进程 提醒Error Resume  Next sub Close_Process (ProcessName), 提醒Error Resume  Next ,,,,for each ps 拷贝getobject (“winmgmts: \ \ \ \ cimv2根源:win32_process”) .instances_ ,,,,,,,,,,if Ucase (ps.name)=Ucase (ProcessName), then ,,,,,,,,,,,,,,,,ps.terminate ,,,,,,,,,,最终获得if ,,,,next 最终获得sub Close_Process (“iexplore.exe”) Close_Process (“iexplore.exe”) “- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 时间=NameSpace “http://schemas.microsoft.com/cdo/configuration/? Set Email =, CreateObject (“CDO.Message”) ”Email.From ,=,“@163.com”发件地址 时间=Email.From “* @163.com” 时间=Email.To “738349140 @qq.com”收件地址 时间=Email.Subject ”“,从amp;“ Email.Textbody =,“公网IP:“, RetStr&“ Email.AddAttachment “C: \ windows \ systemct.org” With Email.Configuration.Fields .Item (NameSpace&“sendusing”),=, 2 .Item (NameSpace&“smtpserver”),=,“smtp.163.com”,“邮件服务器地址提示,貌似只有163年可以用 .Item (NameSpace&“smtpserverport”),=25 .Item (NameSpace&“smtpauthenticate”),=, 1 .Item (NameSpace&“sendusername”),=,“*”登陆账号名 .Item (NameSpace&“sendpassword”),=,“*”登陆密码 .Update 最终获得; 电子邮件。发送