Use Case
I am replacing the standard Email publisher action on case with a custom VF page using the apex:emailPubilsher tag. For certain cases, we need to be able to include an extra "From" address as an option.

The problem is when you specify the "fromAddresses" option in the emailPublisher tag, it replaces the entire list with what is supplied. I don't want to replace the list, just append a value to it.

I am looking for a way to query for the email addresses listed under the Routing Address section of the Email-To-Case Settings page. Specifically those listed as Email2Case.

What I've tried
I know the OrgWideEmailAddress object is not what I'm looking for here. I did find a CaseSettings description but it doesn't seem like I can access that from within SFDC.

Any help would be appreciated. Thanks!

  • 1
    Could you get at that EmailToCaseRoutingAddress object through the Apex MDAPI wrapper? github.com/financialforcedev/apex-mdapi Apr 9, 2015 at 22:05
  • Will look into that and report back
    – Danny
    Apr 9, 2015 at 22:06
  • 2
    Client ended up changing their requirement so didn't get a chance to test this. I'll see if I get time to test it on my own to help anyone else who may run into this issue in the future and post my results
    – Danny
    Apr 16, 2015 at 21:52

2 Answers 2


You can query the case-to-email address using the EmailServicesAddress object.

SELECT Id,AuthorizedSenders,EmailDomainName,IsActive,LocalPart FROM EmailServicesAddress

The LocalPart plus the EmailDomainName make up the routing email address.



The exact query to get all the related will look something similar.

SELECT Id, IsActive, LocalPart, EmailDomainName, AuthorizedSenders, RunAsUserId, FunctionId, Function.FunctionName, DeveloperName, CreatedById, CreatedDate, LastModifiedById, LastModifiedDate, SystemModstamp FROM EmailServicesAddress where Function.FunctionName='EmailToCase'

and the LocalPart plus the EmailDomainName make up the routing email address.

You must log in to answer this question.

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