0

Creating an activity with either API (api3, api4) does not trigger an email to the assignee. Is this by design or is there a problem with my instance of CiviCRM? Activities generated via the GUI and via webform do send emails to assignees. The checkbox to "Notify Activity Assignees" in Administer > Customize Data and Screens > Display Preferences is checked.

CiviCRM 5.61.4, Drupal 7.97

2 Answers 2

0

Not sure it is necessarily by design, but adding activities via API doesn't send emails to assignees. Seems like it should if you have the option checked.

You could post an issue and even potentially fix this yourself, if you're able.

1
2

Yes, you're right, API calls do not send email notifications. Like Lars, I'm not sure whether that's intentional or not - but either way you'll have to do that yourself once you've created the activity. Here's some code you can adapt to your needs - the basic gist is that there are two CiviCRM settings that have a bearing on whether the email gets sent, followed by the send procedure itself.

1
  • CRM_Activity_BAO_Activity::sendToAssignee(), thanks!
    – wil_SRQ
    Jun 12, 2023 at 20:44

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.