Processing of activity id returned from sendEmail changes in 5.36
In 5.36 as a result of dev/core#1750 (closed) to record separate activities for each email in order to record the replaced token values per-contact, when you process the activityId returned from CRM_Activity_BAO_Activity::sendEmail it's only acting on the last activity id if there were multiple recipients. The fact that some extensions do this type of processing was an oversight in the change, and there's a proposal at https://github.com/civicrm/civicrm-core/pull/19873.
That proposal is currently targeted at 5.37, so that would mean a bit more than a month to update this code. It's a pretty simple change:
-$followupActivity = CRM_Activity_BAO_Activity::createFollowupActivity($activityId, $params); +$followupActivity = CRM_Activity_BAO_Activity::createFollowupActivity($activityId, $params);