Skip to content
Groundmail

Free email template

Account deletion email template

Confirms a deletion request and offers a grace period to restore the account. Free and MIT-licensed, in React Email, MJML, HTML and plain text, with light and dark mode built in.

  • MIT license
  • Works with any email provider
  • Light and dark mode

What every account deletion email needs.

The template covers the first five. The sixth is a second email you send on the day.

  1. Confirm what was asked

    Say that you're deleting the account and all of its data, as they asked. No hedging: this email is the record of the request.

  2. The exact date

    A date, not "in 30 days". People need to know how long they have, and support needs to know when it happened.

  3. A restore button that works until then

    A grace period turns a mistake into a click. The template's button restores the account any time before the date.

  4. Say it's permanent after that

    After the date the deletion can't be undone. Saying so makes the grace period mean something.

  5. An "I didn't ask for this" line

    A deletion request can come from someone who took over the account. The template tells people to restore it and change their password.

  6. A second email when it's done

    This template covers the scheduled step. When the date passes, send a short note that the account is gone, then stop sending everything else.

The code. Copy the format your stack uses.

Change the brand name, logo and colors once in theme.ts and every template follows.

import * as React from 'react'
import { Button, Callout, Layout, P, Small, Title } from '../../components'
import type { TemplateMeta } from '../../components/meta'
import { plainText } from '../../components/text'

export type AccountDeletionProps = {
  name: string
  deletionDate: string
  restoreUrl: string
}

export const meta: TemplateMeta = {
  name: 'Account deletion',
  description: 'Confirms a deletion request and offers a grace period to restore the account.',
  group: 'Account',
  subject: 'Your account is scheduled for deletion',
}

export default function AccountDeletion({ name, deletionDate, restoreUrl }: AccountDeletionProps) {
  return (
    <Layout
      preview={`We'll permanently delete your account on ${deletionDate}. You can restore it until then.`}
      footerNote="You're receiving this because a deletion was requested for your account."
    >
      <Title>Your account is scheduled for deletion</Title>
      <P>
        Hi {name}, as you asked, we'll permanently delete your account and all of its data on{' '}
        <strong>{deletionDate}</strong>.
      </P>
      <Callout>Changed your mind? You can restore your account any time before {deletionDate}.</Callout>
      <Button href={restoreUrl}>Restore my account</Button>
      <Small style={{ margin: 0 }}>
        After that date the deletion can't be undone. If you didn't ask to delete your account, restore it now
        and change your password.
      </Small>
    </Layout>
  )
}

AccountDeletion.PreviewProps = {
  name: 'Ada',
  deletionDate: 'November 15, 2026',
  restoreUrl: 'https://example.com/account/restore?token=71c0de',
} satisfies AccountDeletionProps

export function text({ name, deletionDate, restoreUrl }: AccountDeletionProps) {
  return plainText(
    'Your account is scheduled for deletion',
    `Hi ${name}, as you asked, we'll permanently delete your account and all of its data on ${deletionDate}.`,
    `Changed your mind? You can restore your account any time before ${deletionDate}:\n${restoreUrl}`,
    "After that date the deletion can't be undone. If you didn't ask to delete your account, restore it now and change your password.",
  )
}

account-deletion.tsx, 53 lines, shown in full (scroll inside the panel). Typed props. Copy it with theme.ts and components/ from the repo. View on GitHub

Send it with Groundmail

Create the template in your account once, then send it by alias from your app.

1Terminal
npx -y --package=groundmail-cli -- groundmail templates push templates/account-deletion/account-deletion.html \
  --alias account-deletion \
  --name "Account deletion" \
  --subject "Your account is scheduled for deletion" \
  --text templates/account-deletion/account-deletion.txt \
  --publish
2Node.js
import { Groundmail } from 'groundmail'

const groundmail = new Groundmail(process.env.GROUNDMAIL_API_KEY!)

await groundmail.emails.send({
  from: 'Acme <noreply@yourdomain.com>',
  to: 'ada@example.com',
  template: {
    id: 'account-deletion',
    variables: {
      name: 'Ada',
      deletion_date: 'November 15, 2026',
      restore_url: 'https://example.com/account/restore?token=71c0de',
    },
  },
})

The CLI command and the Node.js send from the template's README, which also has Python, PHP and cURL. View on GitHub

Subject lines

People search for this email later, sometimes to prove they asked. Say what's happening, and when if you can fit it.

  • Your account is scheduled for deletionDefaultSays exactly what happened, in words people will search for.
  • Your Acme account will be deleted on {{deletion_date}}GoodAdds the product and the date, so the deadline is visible before opening.
  • Acme: account deletion scheduledGoodBrand first, for people who sort by sender.
  • We're sad to see you goAvoidDoesn't say the account is being deleted or when, which is what people need to find later.

The restore link has to arrive before the date

A deletion email in spam means someone loses their data without ever seeing the way back. It's about their account, so it goes out whatever their email preferences say.

Google, Yahoo and Microsoft sender rules →
  • Send from your own domain with SPF, DKIM and DMARC set up.
  • Send it on your transactional stream, so a marketing unsubscribe never blocks it.
  • Send it the moment the request is made, and log that you did.
  • Groundmail sends this template by alias from your own domain, on our own mail servers. Send it with Groundmail

Questions

Is it free to use?

Yes. The templates are MIT-licensed: use them in commercial products and change them however you like.

Do I need Groundmail to use it?

No. The HTML and text files use plain placeholders that work with most providers' template engines and with Handlebars or Mustache. Sending through Groundmail just saves a step.

Does it work in dark mode and Outlook?

Yes. The full HTML file carries dark-mode styles for Apple Mail and Outlook.com, and the extra markup desktop Outlook needs to draw the button.

How do I change the colors and logo?

Edit theme.ts once (name, logo, address and colors for light and dark) and rebuild. Every template in the set picks it up.