The EmailServicesFunctions  metadata type is not included in any of Gearset's default custom metadata filters. If you wish to deploy this type, you'll be able to find it listed in the custom metadata filter type list under the name "Email services functions".

Behaviour and dependencies

The EmailServicesFunctions  metadata type has a required sting field which corresponds to the Apex class name that that the email service uses to process inbound messages. It is because of this that this metadata type cannot be deployed unless that specific Apex class exists in the target environment. 

You can find the name for that Apex class in the XML for the email services function that you want to deploy, shown in an example below.

If you do not have the Apex class in your target environment, your deployment to create the EmailServicesFunction  will fail with the following message, "An Apex Class must be specified when creating an Email Service" .

Similarly, you cannot deploy a deletion with Gearset of an Apex class that is referenced by EmailServicesFunction  without removing the EmailServicesFunction  too. The deployment will fail, with the following message displayed in the deployment results, "This InboundEmailHandler class is in use. : Apex Class" .

Did this answer your question?