Email Notifications

20+ branded email templates for every transaction and lifecycle event.

Overview

DoorStax sends branded transactional emails for every significant event in the platform. All templates are built using a shared layout system defined in _layout.ts that provides consistent styling with emailStyles,emailHeader, andemailFooter helpers. Each template is a standalone function that returns an HTML string.

Template Reference

The following table lists every email template in the system, along with its trigger event and recipient.

TemplateTriggerRecipientDescription
tenant-invitePM invites tenantTenantInvitation to join the DoorStax tenant portal
payment-receivedSuccessful paymentTenant + PMPayment confirmation with receipt details
payment-failedFailed paymentTenant + PMPayment failure notification with retry info
rent-due-reminder3 days before due (cron)TenantUpcoming rent due date reminder
rent-overdue1/5/15/30 days late (cron)Tenant + PMEscalating overdue rent notifications
autopay-upcoming3 days before autopay chargeTenantPre-charge notification for autopay tenants
autopay-pausedMax retries exceededTenantAutopay suspended due to repeated failures
autopay-enrollmentMonthly enrollment reminderTenantEncourages non-autopay tenants to enroll
payment-refundedRefund processedTenantRefund confirmation with amount and reason
chargeback-notificationChargeback filedPMAlert that a chargeback has been initiated
expense-invoiceTenant-payable expense createdTenantInvoice for a charge assigned to the tenant
eviction-noticeEviction case createdTenantFormal eviction notice email
payout-processedOwner payout sentOwnerPayout confirmation with breakdown
lease-expiration90/60/30/14/7 days before expiryPM + TenantTiered lease expiration reminders
welcome-pmNew PM registrationPMWelcome email with onboarding steps
password-resetPassword reset requestUserSecure password reset link
owner-statementMonthly statement generatedOwnerMonthly financial statement with PDF attachment
onboarding-completeTenant finishes onboardingPMNotification that tenant setup is complete
two-factor-code2FA verificationUserOne-time verification code for login
new-messageNew message receivedUserIn-app message notification
acquiring-agreementSigned merchant agreementAdminMerchant acquiring agreement confirmation

Customization

All email templates use DoorStax branding with a purple accent color scheme. The header includes the DoorStax logo, and the footer includes Kadima payment branding, support links, and unsubscribe options. Emails are rendered as inline-styled HTML for maximum email client compatibility.

Shared Layout

The shared layout is defined in _layout.ts and exports three helpers used by every template:

ExportDescription
emailStylesCSS object with brand colors, fonts, spacing, and responsive breakpoints
emailHeaderReturns the HTML header block with DoorStax logo and purple gradient bar
emailFooterReturns the HTML footer with Kadima branding, support email, and legal links
Template Structure Example
import { emailStyles, emailHeader, emailFooter } from "./_layout";

export function paymentReceivedEmail(data) {
  return `
    <!DOCTYPE html>
    <html>
    <head><style>${emailStyles}</style></head>
    <body>
      ${emailHeader()}
      <div style="padding: 32px;">
        <h1>Payment Received</h1>
        <p>Amount: $${(data.amount / 100).toFixed(2)}</p>
        <p>Property: ${data.propertyName}</p>
        <p>Unit: ${data.unitName}</p>
        <p>Date: ${data.date}</p>
        <p>Confirmation: ${data.confirmationNumber}</p>
      </div>
      ${emailFooter()}
    </body>
    </html>
  `;
}