My understanding is when sending mass email, you can specify the emails by specifying appropriate targetIDs.

You can also set the whatIds() but does this mean that every recipient will receive the same whatIds()?

How do you send different whatIds() to each recipient?

1 Answer 1


Each entry in the whatIds list matches an entry in the targetObjectIds. This means that each recipient will receive an email containing merge fields from a single whatId specific to them.

You can't send multiple whatIds to a single recipient - its a one to one relationship.

  • Thanks. How are the matched? Is it a case, the first element in the targetId array matches the first element in the whatId array; the second element in the targetId matches the second element in the whatId array?
    – dublintech
    Nov 20, 2012 at 14:57
  • 1
    Exactly that - the docs are a little opaque, but there's a snippet : "If you specify whatIds, specify one for each targetObjectId;". Nov 20, 2012 at 15:47

You must log in to answer this question.

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