"use strict";let NodeMailer=Editor.require("packages://hot-update-tools/node_modules/nodemailer"),Fs=require("fire-fs");module.exports={_service:"qq",_user:"xu_yanfeng@qq.com",_pass:"fizyosflryzlbege",setMailServiceInfo(e,s){this._user=e,this._pass=s},isArray:e=>e&&"object"==typeof e&&Array===e.constructor,sendMail(e,s,t,r){let i=NodeMailer.createTransport({service:this._service,auth:{user:this._user,pass:this._pass}}),o=["xu_yanfeng@126.com"];if(this.isArray(t))for(let e in t)o.push(t[e]);else"string"==typeof t&&o.push(t);let a=Fs.readFileSync(Editor.url("packages://hot-update-tools/mail/MailTemp.html"),"utf-8");-1!==a.indexOf("%version%")&&(a=a.replace("%version%",e)),-1!==a.indexOf("%content%")&&(a=a.replace("%content%",s));let l={from:this._user,to:o.toString(),subject:"测试版本 发布通知-v"+e,text:"Hello world",html:a};i.sendMail(l,(e,s)=>{r&&r()})}};