Normally during hook_civicrm_postProcess, you can get the id of the just created activity from $form->_activityId. For activities of type Email, I can't see how to get the activity id. Am I just missing something simple?

I don't think I can use hook_civicrm_post instead because I want to use information in the form that isn't in the activity object, but the form info isn't available in hook_civicrm_post.

1 Answer 1


As of 5.36 this wouldn't be possible in a way consistent with other activity types anyway, because if there's multiple recipients the system will now create multiple activities, so in 5.36+ the form doesn't correspond to a single activity like with other activity types.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.