I populate a list of emails
emailsToBeSent and send them all at once. However These emails are related to different sObjects. And to me it is important to know which sObject the returned results are related to in the case of an error.
Here's the code I have right now:
For that I get a list of results with a
isSuccess() value. How can I know which result is related to what sObject?
My only hope is - perhaps if the returned list of results keeps the order of the emails from the
emailsToBeSent list. Can anybody confirm or reject this idea?