1

I have got an email address after creating an email service in Salesforce. Now I want to add the email address which I got from email service in "Organisation-Wide-Email addresses" and verify them. I have added the email address in organization wide address but how can I verify it?

  • Is that address a routing address? Is any email sent to this address creates a case in SFDC? – manjit5190 Feb 20 '18 at 13:32
2

Ahhh you can try one hack which I have used when I face similar issue. In your email service handler class create any test record and save the email body.

Now send the verification email and your class will create the record. Now from the body of record you will get the verification link and Now you can easily verify the email.

1

There are various ways you can do it. Our main motto is to make our code in such a way via which we will be able to do it in LIVE and sandbox without much hassle.

  1. Use of Hierarchical custom settings having a boolean field.
  2. Modify your apex class in such a way to use the custom setting field. If the field's value is true, insert a dummy record or forward a mail to your address.
  3. If custom settings value is false, do your normal email service operation.

By this your Class once created will have the power to be attached to multiple email services and you can easily verify the, using custom settings as a switch which is quite useful if you want seamless integration in UAT LIVE or multiple sandboxes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.