Skip to content

Refactor email activity creation

mattwire requested to merge mattwire/emailapi:emailactivity into master

This refactors how email activities are created to fix some bugs and allow it to work better with extensions like https://lab.civicrm.org/extensions/msgtplblocker

  1. Make sure we always have a source_contact_id set to create an activity (otherwise it will fail).
  2. Create the activity before sending the email - otherwise you can have a situation that an email sent but then something crashed before the activity could be created and it looks like no email was sent.
  3. Move the email activity creation code into it's own class so the main "send" function is cleaner.
  4. Add CC/BCC information to the email activity so we can see if it was CC/BCC'd.

Merge request reports

Loading