// Quick size test for email templates - run with: node tmp_email_size_test.js const src = require('fs').readFileSync('src/lib/email.ts', 'utf8'); // Extract the constants we need const clr = { bg: '#F5F2EC', card: '#FFFFFF', header: '#0B0D14', headerAccent: '#1A1D2E', gold: '#C8A257', goldDim: '#A07E3A', text: '#1A1A1A', textSoft: '#5A5A5A', textMuted: '#909090', border: '#E8E3D8', pillBg: '#F0EDE5', ctaBg: '#0B0D14', ctaText: '#FFFFFF', }; const dotGridPattern = `url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.5%22%20fill%3D%22%23C8A257%22%20fill-opacity%3D%220.18%22%2F%3E%3C%2Fsvg%3E)`; const webFontHead = ` `; const appUrl = 'https://www.qrmaster.net'; function emailShell(headExtra, bodyContent) { return ` ${webFontHead} ${headExtra}
${bodyContent}

www.qrmaster.net  ·  support@qrmaster.net

© 2026 QR Master. You're receiving this because you created an account.

`; } // Build welcome email const firstName = 'Timo'; const createUrl = `${appUrl}/create`; const welcomeHtml = emailShell('', `
QR Master

Welcome,
${firstName}.

The physical world is now your canvas.

Beautiful QR Code Experience

Let's be honest: most QR codes are static, look terrible, and break the moment you change a link. We built QR Master to fix that.

Your account is fully activated. You now have the power to create beautiful, dynamic QR codes that adapt to your brand, never expire, and track every single scan (device, location, and time).

To give you the perfect start, we've loaded your account with everything you need:

`); const sizeKB = Buffer.byteLength(welcomeHtml, 'utf8') / 1024; console.log('Welcome email rendered size:', sizeKB.toFixed(1), 'KB'); console.log('Gmail clips at: 102 KB'); console.log('Status:', sizeKB < 102 ? 'OK - under limit' : 'CLIPPED - over 102KB limit!'); console.log(''); console.log('Shell overhead approx:', Buffer.byteLength(emailShell('', ''), 'utf8') / 1024, 'KB');