I am setting up Email Services in Salesforce. I have created an Apex Class which performs a logic and have created a new Email Service Address as well.

When, I send an email to the new Email Service Address, the logic written on the Apex class is triggered on Salesforce and it works correctly.

Now, I don't want my users to keep on using the huge Email Service Address generated by Salesforce so, I was trying to create Email Forwarding in my Organization's Gmail box, as per the documentation for Email-2-Case : https://help.salesforce.com/s/articleView?id=000381055&language=en_US&r=https%3A%2F%2Fwww.google.com%2F&type=1

Now, as per the document's Step 12, I should see a new Case created in my Salesforce org but that is not happening as a result of which I am not getting the Verification Code.

I am not sure how to make this work.

1 Answer 1


It says you should see a case created because it's email to case functionality.

For your scenario the way to test that the forwarding works is to send an email to the gmail address, it should be forwarded to the Salesforce technical address that you can see on your email service, and the logic of your apex class should run.

So if in your logic you create a record you should see it in Salesforce. (or just add a system debug in your apex class to log 'email received') and with a debug log you will see if your apex code was triggered from the email sent to the gmail address.

I hope it helps.

You must log in to answer this question.

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