Autofiling inbound emails as activities via EmailProcessor is a really nice feature. However for some CivCRM users it would be nice to have (always and system-wide) only filed activities for the FROM and TO contacts. Is there a way have CC addresses ignored?
You can ALMOST do it with hook_civicrm_emailProcessorContact, but you don't know at that point which ones are cc's.
But you might be able to do it with hook_civicrm_emailProcessor because there you know which are cc's, except you only have their email not the contact_id. So I admit this is awkward but you could do something like:
- For each of the cc's, look up the contact id from the email address the same way the email processor does -
- The activity_id should be in the $result param in the hook.
- Delete the corresponding entry in civicrm_activity_contact. (If they were listed both as a To and a Cc you might need to get a little fancier.)