Email audit

Email audit

Email audit is for teams that need a practical quality review before messages reach a large audience. It helps answer whether an email is ready from a content and operational perspective, not just whether the HTML technically exists.

What an email audit should answer

  • Are the important links valid and reachable?
  • Are the images loading the way we expect?
  • Does the message appear complete and trustworthy?
  • Are there obvious issues that should stop a release or campaign launch?

When to run audits

Use email audit:

  • before a release that changes transactional email templates
  • before a marketing or lifecycle campaign goes wide
  • when QA needs a repeatable quality review step
  • after a captured campaign sample reveals something suspicious
  1. Capture or select the message you want to review.
  2. Check links, images, and visible content quality.
  3. Review any issues that would affect trust, conversion, or support load.
  4. Re-run the audit after fixes before approving the send.

API examples

Use these endpoint-focused flows when you want to automate audits in CI or release checks.

Send an email and audit it by email ID

First send a sample email and wait for capture:

typescript
await inboxController.sendEmailAndConfirm({
inboxId: inbox.id!,
sendEmailOptions: {
to: [inbox.emailAddress!],
subject,
isHTML: true,
body: '<html><body><h1>Email audit smoke test</h1><p>This message checks email audit endpoints.</p></body></html>'
}
});
const email = await waitForController.waitForLatestEmail({
inboxId: inbox.id,
timeout: 60_000,
unreadOnly: true
});

Then run a one-shot analysis and persist it:

typescript
const oneShotAudit = await emailController.checkEmailAudit1({
emailId: email.id!
});
const persistedAudit = await emailController.createEmailAuditForEmail({
emailId: email.id!
});

Create persistent audits directly from content

When you want to evaluate template payloads without first storing an email, create audits directly:

typescript
const baselineAudit = await emailAuditController.createEmailAudit({
createEmailAuditOptions: {
subject: baselineSubject,
fromAddress: 'alerts@example.com',
recipient: 'qa@example.com',
htmlBody:
'<html><body><h1>Baseline</h1><p>All systems nominal.</p></body></html>',
textBody: 'Baseline audit'
}
});
const currentAudit = await emailAuditController.createEmailAudit({
createEmailAuditOptions: {
subject: currentSubject,
fromAddress: 'alerts@example.com',
recipient: 'qa@example.com',
htmlBody:
'<html><body><h1>Current</h1><p>All systems nominal with updates.</p><a href="https://www.mailslurp.com">MailSlurp</a></body></html>',
textBody: 'Current audit'
}
});

List recent audits and fetch one by ID

Use list and get operations to power dashboards or release review screens:

typescript
const recentAudits = await emailAuditController.getEmailAudits({
since: new Date(Date.now() - 10 * 60 * 1000).toISOString(),
limit: 20
});
const fetchedAudit = await emailAuditController.getEmailAudit({
auditId: currentAudit.id
});

Compare two audits

Compare baseline vs current versions to quantify quality drift:

typescript
const comparison = await emailAuditController.compareEmailAudits({
auditId: baselineAudit.id,
otherAuditId: currentAudit.id
});

Delete obsolete audits

Clean up outdated records when they are no longer needed:

typescript
await emailAuditController.deleteEmailAudit({
auditId: baselineAudit.id
});

Best paired tools

Who uses this most

  • QA teams approving release changes
  • lifecycle and CRM teams checking campaign quality
  • platform teams reviewing high-risk transactional template updates