CiviCRM Cookbook
上QQ阅读APP看书,第一时间看更新

Autofiling e-mails

Interactions between your contacts and your organization are many and complex. A lot of these interactions will involve exchanges of e-mail. You may want to keep a record of these exchanges for each of your contacts. This is particularly useful in situations where you are dealing with a contact and you need to see a history of correspondence relating to the contact and other members of your organization. CiviCRM lets you do this by filing e-mail correspondence as an activity on each contact record.

How to do it…

We will set up an e-mail account that will act as a "dropbox" for messages that we want to file, and link this to CiviCRM.

  1. Set up an e-mail account. You can use Gmail or an account provided by your hosting provider. In this recipe we will use an account called filing@mycivicrmsite.com.
  2. Navigate to Administer | System Settings | Enable CiviCRM components, and make sure that CiviMail is enabled.
  3. Navigate to Administer | CiviMail | Mail Accounts.
  4. Click on the Add Mail Account button and complete the details for each account you are adding. Getting this right can sometimes be a matter of trial and error. Leave the Source field blank.
  5. Create a test e-mail message in your e-mail client, and Bcc it to filing@mycivicrmsite.com.
  6. Navigate to Administer | System Settings | Scheduled Jobs, and execute the job titled Process Inbound Emails.
  7. Click on the View Job Log link to see the log entry. If the log error message is Failure, this is highly likely to be a connection problem, so you must go back to Administer | CiviMail | Mail Accounts, and make the necessary changes.
  8. Navigate to Reports | Contact Reports | Activities. You will see that CiviCRM has recorded e-mail activities for the sender and the recipient of the e-mail.

How it works…

Each time CiviCRM processes inbound e-mails, it checks the e-mail account you had set up. It then processes each message. If the sender or recipient e-mail address is not held within CiviCRM, it will create a new contact record for each, and will file the e-mail activity.

If the contacts do exist, it files the e-mails as an activity for the sender and an activity for the receiver.

See also