Email Management Patterns

Based on Real Implementation Experience: Email is often the primary communication channel with customers, students, and citizens, and poorly designed email patterns quickly become a support burden.

Overview

Salesforce supports multiple email mechanisms:

This document focuses on when to use which mechanism, how to manage templates and branding, and how to design email flows that are reliable, traceable, and secure.

Prerequisites

When to Use Which Email Mechanism

Use Standard Email Alerts and Actions When

Use Apex Email When

Core Concepts

Templates and Personalization

Deliverability and Limits

Patterns and Examples

Pattern 1: Flow-Driven Notifications

Pattern 2: Apex-Driven Bulk Notifications

Edge Cases and Limitations

Q&A

Q: When should we move from standard email alerts to Apex email?

A: Move when you need dynamic recipient logic, complex personalization, bulk sending with batching, or centralized logging that is difficult to achieve using only declarative tools.

Q: How do we avoid over-notifying users?

A: Define clear notification rules, add rate limiting where appropriate (e.g., only one email per case per hour), and test with real users. Avoid sending multiple near-identical notifications triggered by the same change.