You need to sign in to do that
Don't have an account?
Is there a way to retrieve Email to Case routing addresses from Apex?
I would like to be able to retrieve all of the email addresses enumerated in Email to Case settings through Apex.
Is this possible?
Is this possible?
Yes its possible to get the Routing address from Email-to-case Setting, but you can't get that routing full address directly.
you have to do some tricky part.
Like Query the fields from the Object called "EmailServicesAddress"
"SELECT EmailDomainName,IsActive,LocalPart FROM EmailServicesAddress" it will display EmailDomainName, LocalPart these to things contain your routing address part.
after Query those part you have to form a string like below
LocalPart @ EmailDomainName--- This is your routing address. which you configured in that Email to case settings.
Hope this will gelp you.
Mark Best ANSWER if its works for you.
Thanks
karthik
EmailServicesAddress---AuthorizedSenders
EmailMessage--Incoming,ToAddress
For this you need compare 2 objects in compare "AuthorizedSenders " in EmailServicesAddress and To address in EmailMessage and get the "Incoming "is true or false. bsaaed on that you do your thing.
Thanks
karthik