"use strict";(()=>{vare={};e.id=5116,e.ids=[5116],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){returnfunctione(r,t){returntinr?r[t]:"then"inr&&"function"==typeofr.then?r.then(r=>e(r,t)):"function"==typeofr&&"default"===t?r:void0}}})},5068:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>c,routeModule:()=>p});varn={};t.r(n),t.d(n,{default:()=>u});vars=t(89947),a=t(2706),i=t(96762),o=t(96052),l=t(67619);asyncfunctionu(e,r){if("GET"!==e.method)returnr.json({msg:"Failed!"});try{await(0,o.default)({alias:"support",html:"<h1>Test Mail</h1><p>Hi there DSQL. Firing up on all systems now.</p>",subject:"Test Mail",text:"Test Mail",to:"dexomediaorg@gmail.com"}),r.json({success:!0})}catch(e){(0,l.default)({component:"/api/addUserMedia/catch-error",message:e.message}),r.json({success:!1,msg:"Database Files could not be written!"})}}letc=(0,i.M)(n,"default"),d=(0,i.M)(n,"config"),p=news.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/test/mail",pathname:"/api/test/mail",bundlePath:"",filename:""},userland:n})},96052:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o});varn=t(29021),s=t.n(n),a=t(21572);leti=t.n(a)().createTransport({host:process.env.DSQL_MAIL_HOST,port:465,secure:!0,auth:{user:process.env.DSQL_MAIL_EMAIL,pass:process.env.DSQL_MAIL_PASSWORD}});asyncfunctiono({to:e,subject:r,text:t,html:n,alias:a,senderName:o}){letl;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)returnnull;letu=(a?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!s().existsSync("./email/index.html"))return;letc=s().readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,n||"").replace(/{{issue_date}}/,Date().substring(0,24));try{letn={};n.from=`"${o||"Datasquirel"}" <${u}>`,n.sender=u,a&&(n.replyTo=u),n.to=e,n.subject=r,n.text=t,n.html=c,l=awaiti.sendMail(n)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}returnl}},67619:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});varn=t(29021),s=t.n(n);asyncfunctiona({user:e,message:r,component:t,noMail:n,req:a}){leti=newDate,o=(()=>{if(!a)returnnull;try{lete=a.headers["x-forwarded-for"],r=a.headers["x-real-ip"],t=a.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||a.socket.remoteAddress;if(!s)returnnull;returnString(s)}catch(e){returnnull}})();try{letn=`🚀 SERVER ERROR ===========================