Receiving Email

The two steps for configuring Force.com to process inbound emails are as follows:

1. Write an Apex class that implements a specific interface (Messaging.InboundEmailHandler) and method (handleInboundEmail). This provides your code access to the envelope (Messaging.InboundEnvelope) and content (Messaging.InboundEmail) of inbound emails, including mail headers and attachments. It is otherwise standard Apex code with no special restrictions. The return value of this method is a Messaging.InboundEmailResult. To indicate processing failure, set the success field of this object to false. Any explanatory message set in the message field is returned to the sender as an email response.

2. Create an Email Service using the native user interface. ...

Get Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.