diff --git a/src/email.js b/src/email.js index 2f75905..408a541 100644 --- a/src/email.js +++ b/src/email.js @@ -64,7 +64,7 @@ function planLabel(planCode, durationDays) { * Send the license key email to the customer. Called after every payment * (initial purchase or renewal extension). */ -export async function sendLicenseEmail({ to, code, durationDays, planCode, expiresAt, extended = false }) { +export function renderLicenseEmail({ code, durationDays, planCode, expiresAt, extended = false }) { // Lazy-load logos as inline data URIs if (!dashcaddyLogoDataUri) dashcaddyLogoDataUri = loadLogo('dashcaddy-logo.jpg'); if (!samiahmedLogoDataUri) samiahmedLogoDataUri = loadLogo('samiahmed7777-logo.png'); @@ -87,7 +87,20 @@ export async function sendLicenseEmail({ to, code, durationDays, planCode, expir `Plan: ${planLabel(planCode, durationDays)}`, `License valid until: ${formatDate(expiresAt)}`, '', - 'To activate: paste this license key into your DashCaddy dashboard at Admin → License.', + ...(extended ? ['To activate: paste this license key into your DashCaddy dashboard at Admin → License.'] : []), + ...(extended ? [] : [ + '', + 'YOUR SUBSCRIPTION INCLUDES:', + '- Auto-Login SSO - one-click secure sign-in for every app you deploy', + '- Recipes - deploy complete multi-app stacks in one click', + '- Swarm orchestration - run containers across multiple servers as one fleet', + '- Automatic renewals - time is added to your license automatically; no new keys to paste', + '', + 'GETTING STARTED:', + '1. Open your DashCaddy dashboard and go to Admin -> License.', + '2. Paste your license key and click Activate.', + '3. SSO, Recipes, and Swarm unlock instantly. Questions? Just reply to this email.' + ]), '', 'Need help? Reply to this email or visit https://dashcaddy.net/about', '', @@ -123,7 +136,7 @@ export async function sendLicenseEmail({ to, code, durationDays, planCode, expir
${extended ? 'Your DashCaddy Premium license has been extended. Same key, more time.' - : 'Thank you for purchasing DashCaddy Premium. Your license key is below.'} + : 'Thank you for purchasing DashCaddy Premium \u2014 your subscription is active and your license key is below. Here\u2019s what you unlocked and how to start using it.'}
What your subscription unlocks
+| • | Auto-Login SSO — one-click secure sign-in for every app you deploy. |
| • | Recipes — deploy complete multi-app stacks in one click. |
| • | Swarm orchestration — run containers across multiple servers as one fleet. |
| • | Automatic renewals — your license extends itself every cycle. No new keys, nothing to re-paste. |
Getting started takes about a minute:
+| 1. | Open your DashCaddy dashboard and go to Admin → License. |
| 2. | Paste the license key above and click Activate. |
| 3. | That’s it — SSO, Recipes, and Swarm unlock instantly. Questions? Just reply to this email. |
| Plan | @@ -146,9 +178,11 @@ export async function sendLicenseEmail({ to, code, durationDays, planCode, expir
To activate, paste this license key into your DashCaddy dashboard at Admin → License.
+ ` : ''}