What does the error "Limit_Exceeded: Too many target object ids" mean. I couldn't find any documentation related to this. We are getting this error when we do mass emails from Apex in Salesforce.


1 Answer 1


See the documentation.

You can list up to 250 IDs per email. If you specify a value for the targetObjectIds field, optionally specify a whatId as well to set the email context to a user, contact, or lead. This ensures that merge fields in the template contain the correct data.

  • 3
    Can you add the relevant information from that link? You know the drill. :P
    – Adrian Larson
    Commented Aug 3, 2016 at 17:21
  • Thank you. I was able to replicate the issue in sandbox based on this info.
    – RajeshShah
    Commented Aug 4, 2016 at 14:55

You must log in to answer this question.

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