4

I have defined an email service which unfortunately isn't working. Is there a place I can monitor errors? The class doesn't appear in debug logs.

0

3 Answers 3

9

The likely answer comes from the comment by @MarcDBehr

Email Services can have several Email Addresses. Each Email Address has a context user (i.e. running user)

enter image description here

You need to enable debug logging for that Context User. Well-designed email services do not use a specific individual as the Context user, rather, some dedicated headless user that serves as a traceability aid (as records will be created or modified using that context user and hence the audit fields become more useful)

Another possible answer is the email is sent from a domain not on the whitelist Accept Email from From. If you have set up the Email Service rules to Bounce the message rather than Discard, you gain additional insight as the sender will discover the problem.

And another debugging tool you have is the Email Snapshot feature available in Setup.

0

If everything is proper then debug log should appear.If debug log is not appearing you can check following points: 1. When you are replying to email, please make sure that replyto email id is same that you have added in replyto field on email addresses of email services.

2.Please make sure that you allowed all email addresses in 'Accept Email From' field of email service.

2
  • I've already allowed all email addresses. I'm actually testing sending an email to the service from my own personal email. Nothing is showing up in the log Mar 31, 2015 at 19:18
  • 1
    Are you monitoring (for debugging) the user that the email process is running as (it may not be running as you)?
    – MarcDBehr
    Apr 2, 2015 at 11:10
0

You can also verify the values being passed by giving an erroneous value to the required field on the object you are doing the operation. This will trigger a response email when you send the email to the salesforce org from the receiver. In that email the reason would be highlighted. OR You can check the logs in the developer console.

You must log in to answer this question.

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