4

I am using CiviCRM 4.6.x with Drupal 7.

I would like users who are logged in to be able to see a table or list of all of the mailings they have been sent. The should be able to click on the subject line (or some other link) in the list in order to see the full text of that mailing.

Can this be done and if so, how? In CiviCRM? With Views?

Thanks for any suggestions.

1 Answer 1

5

Yes you can do this with Views.

Important points:

  1. Views must be configured to see the CiviCRM database in settings.php

  2. Create a View for "CiviCRM Activities". "Bulk Mailing" is an Activity type

  3. The 'link' to view the bulk mailing is probably best constructed via "replacement patterns" within the Drupal View. You get this link from the mailing itself, before it is sent. All mailings have a similar link pattern, but each a unique number

  4. Create a Relationship in the view to the Drupal User. Limit the results to the "current user" or the "logged in user". I forget the precise wording. This shows them "their mailings" - rather than everyone's mailings.

6
  • 1
    Thank you for the help. This worked. I created the view for "CiviCRM Mailings, constructed the link, set up the relationship and filter. And it worked. I now have a page with the list of mailings for that user. Yay! HOWEVER, when the user (me, testing, logged in to non-admin account) clicks on the link to the mailing, it says "access denied." These mailings were all set with visibility of "User and User Admin Only." Shouldn't the user be able to see these? I can see them in the list, but can't see the actual mailing. Strange... Nov 10, 2015 at 1:03
  • 1
    And a little research later I found this bug: "Mailing visibility doesn't work as described": issues.civicrm.org/jira/browse/CRM-14841 . So, basically, it's all for nought until that bug gets fixed. Well, at least that's my thinking at this point :-( Please correct me if I am wrong. Thanks again. Nov 10, 2015 at 1:31
  • 1
    Is it necessary to restrict mailings visibility to "user and admin"? What if it was "public"? Nov 10, 2015 at 3:33
  • That would probably be fine, but I don't think I can change that visibility setting for past emails which is what I need to show the users. Nov 10, 2015 at 22:30
  • 2
    You can change visibility of past mailings, in bulk, in the civicrm_mailing table. Backup your database first. Nov 11, 2015 at 0:09

Your Answer

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

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