function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Email2Case error - permission issue


I'm having trouble with my Email to Case agent.

I've got multiple Email to Case agents set up to run on about 7 different email address, and they all work fine.

I'm trying to change the Salesforce user that processes these messages, but I'm getting the following error:

2008-07-09 13:13:12,202 [main] INFO  com.sforce.mail.EmailService  loaded as a t
imer service.
2008-07-09 13:13:13,834 [Timer-0] INFO     processing 1 messages
2008-07-09 13:13:16,108 [Timer-0] ERROR Routing Addresses are not set up correct
ly to run Email To Case.
2008-07-09 13:13:16,118 [Timer-0] ERROR com.sforce.exception.InvalidConfiguratio
nException: Routing addresses are not setup correctly.
com.sforce.exception.InvalidConfigurationException: Routing addresses are not se
tup correctly.
        at com.sforce.mail.GenericClient.handleMessage(
        at com.sforce.mail.GenericClient.receive(
        at com.sforce.mail.EmailService$
        at java.util.TimerThread.mainLoop(Unknown Source)
        at Source)

 The only thing I'm changing is the Salesforce login and password.

I've had a look, and if I change this user on to the System Admin profile, this error goes away and email to case works fine.
If I put it back on it's current custom profile, this error occurs every time.

Obviously it is bad practice to give users System Admin access when you don't need to, so I'm trying to determine which permissions I need to grant it in order for this to work.

Looking at the permissions I've granted to the profile, I can't see anything else (secure) that I can grant it.
ie.  I've already given it the "manage cases", "edit tasks", "edit event's", "send emails" and bascially full permission access to all objects.

I have tried giving the new user the 'modify all data' and 'customize application' permissions (against my better judgement) as per the Salesforce online help, but this didn't help.

Does anyone know which permission is being denied?


It might be that it just can't log in with this user so it's unable to get the routing addresses.  Are you able to log in with these credentials in the Explorer?
Hi werewolf

Thanks for the suggestion.

The computer that our email to case is set up on also runs another script utilising the Apex Dataloader that uses this user when loading data into Salesforce.

I haven't tried using these credentials in the explorer as I haven't used the explorer.
I'll look into using the explorer and see if that makes a difference.

You need to make sure the new Profile has access to the same record types that are used (if any) -- I've found that to be the problem in the past. You should also make sure the new user is correctly associated with any sharing rules (if any) so users will have visibility to the Cases that are created.

Hi Mark

Thanks for that.

That indeed was the issue and has now solved this problem.