Salesforce Inbound Email Message Handling

Handling Inbound Email Messages in Salesforce

Question

What three classes along with the Messaging.InboundEmailHandler are used to handle inbound email messages in Salesforce?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.

The correct answer is B. Messaging.InboundEmail, Messaging.InboundEmailResult, Messaging.InboundEnvelope.

In Salesforce, when an email is sent to an email service address, the Messaging.InboundEmailHandler class is used to handle and process the email. This class is responsible for receiving the email message and delegating the processing of the email to other classes.

The three classes that are used along with the Messaging.InboundEmailHandler class to handle inbound email messages in Salesforce are:

  1. Messaging.InboundEmail: This class represents an inbound email message. It contains information about the email, such as the subject, body, sender, and recipients. This class is used by the Messaging.InboundEmailHandler class to receive the email message.

  2. Messaging.InboundEmailResult: This class represents the result of processing an inbound email message. It contains information about the success or failure of the processing, as well as any error messages that may have occurred.

  3. Messaging.InboundEnvelope: This class represents the envelope of an inbound email message. It contains information about the email message, such as the message ID, the date and time the message was sent, and the email addresses of the sender and recipients.

Option A (Apex code, Visualforce pages, and controllers) is incorrect because these are not classes that are specifically used to handle inbound email messages in Salesforce.

Option C (Messaging.InboundEmailHandler) is incorrect because this class is already mentioned in the question stem and is not one of the three classes that are used along with it to handle inbound email messages.

Option D (Make calls to methods using both valid and invalid inputs) is incorrect because it is not related to handling inbound email messages in Salesforce.