This documentation relates to CiviCRM version 3.1. It's not maintained anymore.
Current version of documentation.

How to get Public Archives with Drupal and CiviMail

Skip to end of metadata
Go to start of metadata

This page refers to outdated version of CiviCRM. Check current version of documentation.

Documentation Search

CiviCRM 3.1 Documentation

Support and Participation

Developer Resources

CiviCRM book!

Make sure to check out Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

I love CiviMail except that it doesn't give any options to create a public archive of mailings, as I use it to send organizational newsletters. This describes how you can use CiviMail in conjunction with Drupal's Mailhandler module to do just that.

To do this, you need to have CiviMail set up and configured. Those instructions can be found elsewhere on the wiki. The second requirement is that you are running the Drupal Mailhandler module ( This can be a little tricky, as you must have the IMAP extension enabled in PHP. This could cause you to have to recompile php if it's not already built in to your release. However, you may be able to get around recompiling php.....We are running Fedora Core 6 and found a package called php-imap which gave us the functionality we needed without recompiling php (yum install php-imap). Your distribution hopefully has something similar. Here's the order I configured Mailhandler in (it was kind of tricky to get working and threw lots of connection errors at first, so if you're having problems start over and do it in this order):

1. Create a new email address that will be used to receive the mailings. Ideally nothing else will go to this address or else it too will get published to your site.We'll say

2. Send something to or whatever you created. You'll want to send this email from an email address corresponding to a drupal user on your site (who has privs to post).

3. SSH into your drupal install machine and make sure you can telnet to that email address you created and see the email you just sent. For a how to on telnet into email, see

4. Go to your drupal user administration and add a user called "newsletter". The email address you associate with this account should be the same one you just set up ( and will also be the same one you add in to mailhandler configuration.

5. There should be no need to give this user anything beyond authenticated user least I didn't.

6. Go to admin/mailhandler (assuming you've got it installed and access privs set up already). Choose to add an email.

7. Put the email address you created above in the first line. Choose POP3 (or IMAP if you prefer) and set the port accordingly (your telnet session to your email box will tell you if port 110 is correct for POP3). Fill out the username and password for the email address you created. You may need to include the full as opposed to just "newsletter" depending on how your mail server is configured, so you might need to try both. Put "/notls" (no quotes) in the extra commands area. The rest of the info that you fill out is really dependent on your server and your preferences, so it's up to you. When you're all set, click submit. Then test the mailhandler by clicking "receive". You should successfully retrieve the message you sent yourself.

Note: Mailhandler module says it won't retrieve mail twice so you don't have to check "delete after receiving". I have found this to be false. It pulls them in every time. So I would recommend checking that box.

8. If it successfully receives mail, check your recent should see a new blog posting by the user who sent the test mailing to the mailhandler email address. 

Now how to integrate this with CiviMail. Very simple. All you need to do is include the mailhandler email address with all of your CiviMail blasts. So for me, is in my CiviCRM newsletter group which I send out my newsletter to. So every time I send out a mass mailing, it automatically gets published as a blog entry. You'll want to always send as the same user and only have these blog posts be the purpose of that user. So I always send from as well.  Then just create a link to that blog called "Newsletter Archive" and you're set up!

  • None

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.