# What is email relay, and why is it critical for enterprise security compliance in Sales Cloud?

**Topic:** Sales Cloud · **Difficulty:** Medium · **Tags:** Sales Cloud, Email Relay, Security Compliance

Read it on the site: https://www.forcechallenges.com/interview-questions/what-is-email-relay-and-why-is-it-critical-for-enterprise-security-compliance-in-sales-cloud

## Answer

**Basics:** By default Salesforce sends email from its own servers. Some enterprises must route outbound email via their own gateway for data loss prevention, archiving or domain trust. Email relay is that option; it is different from Compliance BCC, which silently copies outbound mail to an archive address.

**How it works:**
1. Verify your sending domain under Setup > Email Domains and set up DKIM.
2. Under Email Relays, define the relay: your SMTP host, port, TLS settings and optional authentication.
3. Create email domain filters that decide which senders or domains use that relay.
4. Salesforce hands qualifying outbound messages to your SMTP host, which delivers them.
5. Test with Send Test Email and review email logs.

**Advanced / deep dive:** Relaying makes your server a dependency: if it is down or rejects mail, Salesforce email to those domains fails. Keep SPF, DKIM and DMARC aligned; with relay, SPF must authorize your relay, not just Salesforce. Not every email path necessarily honors the relay (scope depends on feature and release), so verify which email types are covered, and do not assume it is "all outbound email". For audit, combine relay with Compliance BCC (Setup > Compliance BCC Email) and Event Monitoring email events. Deliverability access level (All email, System email only, No access) is a separate control and is the first thing to check in sandboxes, which default to system email only.

**Code / config example:**
```
Setup > Email > Email Domains: add and verify company.com, publish DKIM CNAMEs
Setup > Email > Email Relays > New
  SMTP Host: smtp.company.com  Port: 587  TLS: Required
  Auth: username/password (if needed)
  Domain filter: sender domain = company.com
Test: Setup > Email > Send Test Email
```

**Hidden gotchas & must-remember points:**
- A relay outage blocks or bounces the affected emails.
- SPF/DKIM/DMARC must account for the relay path or mail will be flagged as spam.
- Compliance BCC is a separate feature and has its own approval and address rules.
- Sandbox email deliverability defaults to system email only after refresh.
- Relay filters control scope; misconfigured filters leave some mail going direct.
- Confirm coverage for flows, Apex Messaging and mass email in current docs.

**Best practice:** Pilot one domain through the relay, test all email channels, and monitor bounces before moving the rest.

---
Source: ForceChallenges · last updated 2026-11-02
