EmailServicesFunction
File Suffix and Directory Location
EmailServicesFunction components have the suffix .xml and are stored in the emailservices folder.
Version
EmailServicesFunction components are available in API version 42.0 and later.
Fields
Field Name | Field Type | Description |
---|---|---|
apexClass | string | Required. The name of the Apex class that the email service uses to process inbound messages. |
attachmentOption | EmailServicesAttOptions (enumeration of type string) | Required. Indicates the types of attachments the email service accepts. One of
the following values:
|
authenticationFailureAction | EmailServicesErrorAction (enumeration of type string) | Required. Indicates what the email service does with messages that fail or do
not support any of the authentication protocols if the isAuthenticationRequired field is true.
One of the following values:
|
authorizationFailureAction | EmailServicesErrorAction (enumeration of type string) | Required. Indicates what the email service does with messages received from
senders who are not listed in the authorizedSenders field on either the
email service or email service address. One of the following values:
|
authorizedSenders | string | Configures the email service to only accept messages from the email addresses or domains listed in this field. If the email service receives a message from an unlisted email address or domain, the email service performs the action specified in the authorizationFailureAction field. Leave this field blank if you want the email service to receive email from any email address. |
emailServicesAddresses | EmailServicesAddress[] | A list of EmailServiceAddress records. |
errorRoutingAddress | The destination email address for error notification email messages when isErrorRoutingEnabled is true. | |
functionInactiveAction | EmailServicesErrorAction (enumeration of type string) | Required. Indicates what the email service does with messages it receives when
the email service itself is inactive. One of the following values:
|
functionName | string | Required. The name of the email service in the API. This name can contain only
underscores and alphanumeric characters and must be unique in your org. The value in
this 64-character field must begin with a letter, not include spaces, not end with
an underscore, and not contain two consecutive underscores. In managed packages,
this field prevents naming conflicts on package installations. This field is
automatically generated, but you can supply your own value if you create the
record using the API. With this field, a developer can change the object’s name in
a managed package and the changes are reflected in a subscriber’s organization.
|
isActive | boolean | Indicates whether this object is active (true) or not (false). |
isAuthenticationRequired | boolean | Configures the email service to verify the legitimacy of the sending server before processing a message. The email service uses the SPF, SenderId, and DomainKeys protocols to verify the sender's legitimacy: If the sending server passes at least one of these protocols and does not fail any, the email service accepts the email. If the server fails a protocol or does not support any of the protocols, the email service performs the action specified in the authenticationFailureAction field. |
isErrorRoutingEnabled | boolean | When incoming email messages can’t be processed, indicates whether error notification email messages are routed to a chosen address or to the senders. |
isTextAttachmentsAsBinary | boolean | If true, text attachments are supplied to the Apex code as a Messaging.BinaryAttachment instead of as a Messaging.TextAttachment. This means that the body is supplied as an Apex Blob instead of as an Apex String. |
isTlsRequired | boolean | Not currently in use. |
overLimitAction | EmailServicesErrorAction (enumeration of type string) | Required. Indicates what the email service does with messages if the total
number of messages processed by all email services combined has reached the daily
limit for your organization.
One of the following values:
The system calculates the limit by multiplying the number of user licenses by 1,000. |
EmailServicesAddress
Each email service has one or more email addresses to which users can send messages for processing. An email service only processes messages it receives at one of its addresses.
Field Name | Field Type | Description |
---|---|---|
authorizedSenders | string | Configures the email service address to only accept messages from the email addresses or domains listed in this field. If the email service address receives a message from an unlisted email address or domain, the email service performs the action specified in the authorizationFailureAction field of its associated email service. Leave this field blank if you want the email service address to receive email from any email address. |
developerName | string | Required. The name of the object in the API. This name can contain only
underscores and alphanumeric characters and must be unique in your org. It must
begin with a letter, not include spaces, not end with an underscore, and not contain
two consecutive underscores. This 25-character field must be unique among other
EmailServicesAddress records under the same EmailServiceFunction parent. In
managed packages, this field prevents naming conflicts on package installations.
This field is automatically generated, but you can supply your own value if you
create the record using the API. With this field, a developer can change the
object’s name in a managed package and the changes are reflected in a subscriber’s
organization.
|
isActive | boolean | Indicates whether this object is active (true) or not (false). |
localPart | string | Required. The local-part of the email service address, which is the string that
comes before the @ symbol. For the local-part of a Salesforce email address, all
alphanumeric characters are valid, plus the following special characters: ! # $ % & amp; ' * / = ? ^ _ + - ` { | } ~ , The dot character (.) is also valid as long as it's not the first or last character. Email addresses aren’t case sensitive. |
runAsUser | string | Required. The username of the user whose permissions the email service assumes when processing messages sent to this address. |
Wildcard Support in the Manifest File
This metadata type doesn’t support the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.