
Salesforce Email Validation with MailOdds
Native Apex integrations for email validation, suppression, and data quality. No middleware required. 20 production-ready patterns with Named Credential authentication.
Prerequisites
- MailOdds account with API key
- Salesforce Enterprise Edition or higher
- Named Credential configured for api.mailodds.com
- Apex development access (System Administrator or Developer profile)
Named Credential Setup
All integrations below use a single Named Credential. Configure it once, then reference it as callout:MailOdds in every Apex class.
Create a Named Credential
Setup > Named Credentials > New. Label: MailOdds. URL: https://api.mailodds.com. Identity Type: Named Principal. Authentication Protocol: No Authentication (we pass the key in the header).
Add the Authorization Header
In the Named Credential, enable "Generate Authorization Header" = false. Instead, add a Custom Header: Authorization = Bearer mo_live_YOUR_KEY.
Add a Remote Site Setting
Setup > Remote Site Settings > New. Name: MailOdds_API. URL: https://api.mailodds.com. Active: checked.
Create Custom Fields
On Lead/Contact: Email_Validation_Status__c (Picklist), Email_Validation_Action__c (Text), Email_Sub_Status__c (Text), Email_Validated_At__c (DateTime).
Integration Patterns
10 production-ready patterns, from lead intake gating to campaign pre-send audits. Each includes working Apex code.
Lead Intake Gate with Typo Auto-Correction
Validates emails on lead creation, auto-corrects typos via the suggested_email field, and quarantines rejects to prevent bad data from reaching your pipeline.
Division-Specific Validation Policies
Apply different validation rules per business unit using Custom Metadata Type mappings. Enterprise divisions can enforce strict reject-on-risky while SMB can allow catch-all addresses.
Nightly Database Scrub
Schedule a nightly bulk validation job via the API, then use Platform Events to write results back as they complete. Webhook-driven writeback eliminates polling.
Bounce-to-Suppression Pipeline
Automatically sync hard bounces from Pardot/MCAE into the MailOdds suppression list, creating a shared blocklist across your email infrastructure.
Account Email Health Score
Compute an aggregate email health score for each Account by batch-validating all Contact emails. Surface the score on the Account record for CSMs and AEs.
Two-Tier Cost-Optimized Validation
Run standard (free) validation on all inbound leads. Only spend credits on enhanced SMTP validation for leads that pass qualification. Typical savings: 72%.
Domain Blocklist via Policies
Block competitor and freemail domains at the gate. Apply different filtering rules per lead source using validation policies with domain filter rules.
Data Quality Command Center
Pull telemetry data into native Salesforce dashboards. Track validation volume, hit rates, and credit consumption with ETag caching for efficiency.
Conversion Guard with Suppression Gate
Double-gate at Lead conversion: check the suppression list first, then re-validate the email. Prevents converting leads with known-bad addresses into Contacts and Opportunities.
Campaign Pre-Send Audit
Run a pre-flight validation audit on campaign member lists before sending. Generate a risk report with a Go/No-Go recommendation based on valid-email ratios.
Revenue Intelligence Patterns
10 patterns that turn email delivery signals into pipeline actions. Webhook-driven engagement scoring, bounce forensics, deferral monitoring, and transactional sending with structured data.
Understanding is_bot and is_mpp in Webhook Events
is_bot = true when the event came from a security scanner, link prefetcher, or corporate email gateway (not a human). Common with Barracuda, Proofpoint, and Mimecast.
is_mpp = true when the event came from Apple Mail Privacy Protection, which pre-fetches all images and inflates open counts. Affects roughly 50% of iOS/macOS mail users.
Both fields are Booleans on engagement events (opened, clicked). Always guard with == true since they may be absent on non-engagement events.
Additional Custom Fields for Revenue Intelligence
AI-Bot Filtered "Hot Lead" Routing
Receive webhook click events, verify HMAC-SHA256 signatures, filter bot and Apple MPP noise, then bump engagement scores on Leads. Creates a high-priority Task when the score crosses a configurable threshold.
Programmatic "Win-Back" via Suppression Audit
Poll the suppression audit log on a schedule, find hard-bounced contacts, cross-reference Accounts for alternate contacts, and create win-back Tasks for the sales team.
Schema-Driven Transactional Upsell
Fire a transactional upsell email with JSON-LD structured data when an Opportunity closes. Uses campaign_type, schema_data, and ai_summary for rich inbox rendering. Stores the returned message_id for engagement tracking.
Dynamic Sender Reputation Balancing
Poll your sending domain identity score on a schedule. When the grade drops below a configurable threshold, auto-switch to a fallback domain and alert the team with a full breakdown.
Pre-Emptive Revenue Protection
Block Opportunity Close-Won on high-value deals when the primary contact email is unvalidated or rejected. Creates an smtp_required policy via preset, validates with policy_id, and creates an urgent Task on rejection.
Bounce Forensics Pipeline
Receive bounce webhooks with full SMTP forensics: bounce_type, smtp_code, enhanced_status_code, smtp_response, mx_host, and isp. Logs to a custom object and auto-suppresses hard bounces.
Engagement-Decay Re-Validation
Track delivered and human-opened events via webhook (filtering is_bot and is_mpp). A scheduled job finds "zombie" contacts with sends but zero human opens, then re-validates to detect stale addresses.
Campaign List Sync
When a Campaign becomes Active, create a MailOdds subscriber list and sync all members. Uses Queueable chaining to handle lists larger than the 100-callout governor limit.
Proposal Engagement Tracker
Companion to the Transactional Upsell pattern. Matches incoming webhook open/click events by message_id to the Opportunity record. Filters bots and creates a high-priority Task for the AE on first human open.
Deferral Early Warning System
Receive deferral webhooks with smtp_code, smtp_response, mx_host, isp, and attempts. Logs to a custom object and fires an alert when any ISP exceeds a configurable hourly deferral threshold.
Frequently Asked Questions
Troubleshooting
Need more help?
Can't find what you're looking for? We're here to help you get Salesforce working.
Related Integrations
Build Production-Grade Salesforce Integrations
Get 1,000 free validations. Start with one pattern, scale to all twenty.