Email Integration
Audience: Org Admin, System Admin, Deployment Administrator, Developer Related: Configuration · Environment And Secrets · Index
Blackcap sends branded HTML email with plain-text alternatives through configured SMTP. The shared email layout supports Blackcap and Microwave Pie branding, hosted image behavior, environment-aware links, recipient rules, and feature-specific templates.
SMTP credentials are secrets. Feature documents describe when an email is sent; this document is the canonical home for configuration, branding, rendering, delivery, privacy, and troubleshooting.
All centralized transactional email senders use inky_admin/services/email_branding_service.py. The service preserves the complete plain-text body and adds an email-client-safe HTML alternative with:
- a Blackcap by Microwave Pie text identity,
- Blackcap and Microwave Pie logo positions,
- an accessible heading and content area,
- an optional context panel and call-to-action,
- a copyable fallback action URL,
- and a consistent operational footer.
The layout uses restrained table-based HTML, inline styles, system fonts, fixed image dimensions, meaningful alt text, and no JavaScript. Essential content never depends on remote images.
Configuration
Platform settings under the Email section:
email.branding_nameemail.blackcap_logo_urlemail.microwave_pie_logo_urlemail.branding_website_urlemail.branding_support_url
Logo URLs must be public HTTPS resources with no username, password, query string, or fragment. This prevents recipient IDs, organization IDs, tokens, or tracking parameters from entering shared branding URLs. Application action URLs are validated separately so legitimate reset, invitation, sharing, and review tokens remain intact.
Hosted assets
Blackcap defaults to the existing public assets in the Microwave Pie website repository:
assets/blackcap-logo.png→https://microwavepie.com/assets/blackcap-logo.png(128×128 transparent PNG)assets/microwavepie-logo-192.png→https://microwavepie.com/assets/microwavepie-logo-192.png(192×192 PNG)
This avoids maintaining duplicate email-only logo files. The Microwave Pie Netlify configuration applies Cache-Control: public, max-age=604800, must-revalidate to /assets/*. Serve these paths with HTTPS and the correct image/png MIME type, and do not append recipient-specific query parameters. Use the Email configuration settings only when the public asset location changes or an alternate approved logo is required.
Adding a new email type
Create the normal EmailMessage, set From/To/Subject exactly as before, then call apply_branded_email(...) with the complete plain-text body. Add attachments after or before the alternative as required by the current sender; Python's EmailMessage preserves the multipart structure. Never insert raw internal errors, credentials, reset secrets, API Tokens, MFA secrets, or provider credentials into the layout.
Preview
Open docs/previews/blackcap-branded-email-preview.html in a browser. Also test the plain-text part and an email client with remote images disabled.