Mailchimp has a handy feature where it can embed a list of clickable Mailchimp-hosted archives of your email newsletters. Unfortunately, if your site is served over https, then Mailchimp’s “Folder Archive Generator” Javascript code doesn’t work in modern browsers. This is because the JS tries to retrieve the archive over http which creates a mixed encrypted/non-encrypted content page on your site.

<script language="javascript" src="http://us9.campaign-archive2.com/generate-js/?u=abc123&fid=12345&show=10" type="text/javascript"></script>

And you can’t just change the URL from http://us9.campaign… to https://us9.campaign… because Mailchimp doesn’t have SSL certificates running on those domains.

A Solution

Mailchimp doesn’t have an alternative SSL-based server you can use, so you’ll have to either code against their API, or do a PHP hack like this:

$mailchimpArchives = file_get_contents('http://us9.campaign-archive2.com/generate-js/?u= abc123&amp;fid=12345&amp;show=10');
echo('<script language="javascript">' . $mailchimpArchives . '</script>');