0

I have developed an email service from Setup --> Email service that will receive inbound email to an email address specified in this service. I am able to deploy this Email Service using change set between orgs(see image), but is there a way we can deploy the Email address under this email service as well? The email addresses are not deployed along with the emailservice.

Available email service metadata:

enter image description here

I want to deploy this :

enter image description here

1 Answer 1

2

You cannot deploy 'EmailServicesAddress' independently, they would be part of 'EmailServicesFunction'. Use VS code or Workbench and you should be able to successfully deploy Email Addresses. Was able to do successfully using workbench.

Package.xml

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
    <members>Emailservice</members>
    <name>EmailServicesFunction</name>
    </types>
    <version>50</version>
</Package>

Metadata

    <?xml version="1.0" encoding="UTF-8"?>
<EmailServicesFunction xmlns="http://soap.sforce.com/2006/04/metadata">
    <apexClass>myHandler</apexClass>
    <attachmentOption>None</attachmentOption>
    <authenticationFailureAction>Discard</authenticationFailureAction>
    <authorizationFailureAction>Discard</authorizationFailureAction>
    <emailServicesAddresses>
        <authorizedSenders>[email protected]</authorizedSenders>
        <developerName>Emailservice</developerName>
        <isActive>true</isActive>
        <localPart>testing</localPart>
        <runAsUser>[email protected]</runAsUser>
    </emailServicesAddresses>
    <functionInactiveAction>Discard</functionInactiveAction>
    <functionName>EmailTest</functionName>
    <isActive>false</isActive>
    <isAuthenticationRequired>false</isAuthenticationRequired>
    <isErrorRoutingEnabled>false</isErrorRoutingEnabled>
    <isTextAttachmentsAsBinary>false</isTextAttachmentsAsBinary>
    <isTlsRequired>false</isTlsRequired>
    <overLimitAction>Discard</overLimitAction>
</EmailServicesFunction>

enter image description here

enter image description here

Please note 'EmailDomainName' is a read-only field and the system generates a unique domain part for each email service address to ensure that no two email service addresses are identical.

Also, check limitations of standard object(Email Services Address) here.

Thanks

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .