How to solve ReferenceError: window is not defined? this is my code
let timestamp = new Date();
var str = params.email;
var enc = window.btoa(str);
var dec = window.atob(timestamp);
console.log(window)
if (window == "undefine"){
var template = handlebars.compile(html);
var htmlToSend = template({email:enc + "|" + dec});
var mailOptions = {
from: 'support@google.com',
to: params.email,
subject: 'Sending Email using Node.js',
html: htmlToSend
};
