How does On-Demand Email-to-Case differ from traditional email server integration setups?
Answer
Basics: Both features convert inbound email to cases. The difference is where the mail is picked up. With On-Demand, you forward your support mailbox to a Salesforce-generated address and Salesforce does the rest. With the Agent, a small Java application inside your firewall connects to your email server (IMAP or POP) and sends messages to Salesforce. (The original "On-Demand Email-to-Service" name is not a Salesforce feature; it is On-Demand Email-to-Case.)
How it works: On-Demand: Setup > Email-to-Case > Enable On-Demand Email-to-Case, create a Routing Address, verify it through the confirmation email, then set up forwarding from your mailbox to the generated Email Services address. Agent: download and install the agent, configure the mail server connection and the Salesforce login, and keep the machine running. The agent's use is mainly for organizations that cannot forward mail outside their network.
Advanced / deep dive: On-Demand is simpler, scales with Salesforce, has no server to patch and supports Enhanced Email and header-based threading; Salesforce recommends it for new implementations. The Agent offers control for strict network policies but adds operational risk (downtime, upgrades, credentials) and is legacy, so confirm current support status before choosing it. Both are subject to attachment and size limits and to daily processing limits on inbound email, which depend on licenses (verify current numbers). If you need custom parsing, you can instead use Email Services with an Apex class implementing Messaging.InboundEmailHandler, but then you build case creation, threading and attachments yourself. Security considerations: restrict forwarding to the generated address, enable SPF/DKIM/DMARC at your mail provider, and use the authorized sender settings to limit who can create cases.
Code / config example:
global .InboundEmailHandler {
global Messaging.InboundEmailResult {
Messaging. .InboundEmailResult();
insert (Subject = email.subject, Description = email.plainTextBody, Origin = , SuppliedEmail = email.fromAddress);
result.success = ;
result;
}
}