Enterprise Email
Email is the primary RME channel: authenticated, provider-independent, and fully recorded in Salesforce.
What you get over native email
| Native Salesforce | Real Messaging Engine |
|---|---|
Shared *.sfcustomeremail.com sender | Your authenticated domain |
| Shared reputation | Isolated reputation, optional dedicated IPs |
| Daily single-email governor caps | Provider-level throughput |
| Limited event data | Delivered, open, click, bounce, complaint, unsubscribe |
| No provider choice | Six-plus providers with failover |
Sending from Flow
Use the Send Message (RME) invocable action. See Flows.
Sending from Apex
RME_Message.Result result = RME_Message.builder()
.channel('EMAIL')
.templateName('Order_Confirmation')
.recordId(order.Id) // merge context
.toContact(order.Contact__c) // consent + suppression applied
.fromDomain('example.com')
.replyTo('support@example.com')
.attachment(pdfContentVersionId)
.priority('HIGH')
.send();
System.debug(result.messageId + ' → ' + result.status);
Sending over REST
curl -X POST https://<my-domain>/services/apexrest/rme/v1/messages \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel": "EMAIL",
"to": [{ "contactId": "0035f00000AbCdEAAV" }],
"template": "Order_Confirmation",
"context": { "recordId": "8015f00000XyZAbAAL" },
"from": { "domain": "example.com", "name": "Acme Support" }
}'
Content rules
- HTML and plain-text parts are generated together; never send HTML only.
- Inline CSS only — most enterprise clients strip
<style>blocks. - Images require absolute HTTPS URLs and meaningful
alttext. - Total message size stays under 10 MB including attachments; larger payloads should use a Salesforce Files link.
Reply handling
Configure a reply-to subdomain (for example reply.example.com) with an MX record pointing at your provider's inbound parse service. RME matches the inbound message to the original Message__c by return-path token and writes a Message_Reply__c record linked to the same Contact, Case, or Opportunity.
Bulk and batch sending
For high-volume sends, enqueue rather than loop:
List<RME_OutboundMessage> batch = new List<RME_OutboundMessage>();
for (Contact c : contacts) {
batch.add(RME_Message.builder()
.channel('EMAIL')
.templateName('Quarterly_Statement')
.toContact(c.Id)
.build());
}
System.enqueueJob(new RME_BulkSendQueueable(batch, 200)); // chunk size
RME chunks callouts, respects provider rate limits, and retries per Retry Logic.
Continue to SMS.
Was this helpful?
Last updated 1 month ago