As we mentioned in a previous post, we’ve implemented some functionality that allows email marketers to create HTML emails by giving us the URL of their web pages. This is really handy if you’re using a CMS to publish news to your website.

But if you’re a developer, there are some pretty cool advanced tricks that you can use behind the scenes.

Advanced Trick #1: CSS Stylesheets for Email Campaigns:

Have you ever heard of stylesheets for printer-friendly versions of web pages? You can do that for your email campaigns, too. Just use media type = email.

<link rel=”stylesheet” type=”text/css” href=”/email.css” media=”email” />

When MailChimp grabs the URL to build your email, we’ll find the email-specific stylesheet, and use that instead.

Advanced Trick #2: Conditional Content for Email:

When you publish content to your website that you’d also like to use for your email marketing campaigns, you’ll probably want to embed hidden content that only appears in your email campaigns, but not on your website.

For example,most email campaigns have a different “footer” than you’d have in a web page (with the unsubscribe link, can-spam stuff, etc). Obviously, you’d only want that email footer to appear in your email campaigns.

Just use conditional statements like this:

<!–[if MailChimp]>This content will only show for MailChimp<![endif]–>

Okay, so using “MailChimp” is a bit gratuitous. We just couldn’t resist.

But in the interest of turning this into an actually useful standard that other email services could do, you can also just use “email” in your code, like this (case insensitive):

<!–[if email]>This content will only show for MailChimp<![endif]–>

Both “mailchimp” and the more generic “email” would be recognized by MailChimp.

Examples:

I asked Chad, our lead engineer, for examples of when you’d want to use these advanced tricks. Here’s what he gave me (the ones I could understand, at least):

  • Use the media=email stylesheet to override your website’s top navigation and replace it with an email-friendly top navigation (without the fancy JavaScript hovers that fail in email programs).
  • CSS positioning doesn’t work well in most email programs. So common 2-column webpage layouts based on “floats” won’t work in your email campaigns. In your email-version, eliminate the side column from your web page entirely (or use conditional statements to switch to table formats if you want to get really hairy with the code)
  • Use conditional statements and email-specific stylesheets to totally hide “side column bars” that appear on your website that you don’t want in your emails.
  • Use conditional statements to add “Dear *|FNAME|*,” to the top of your content. That’s admittedly a simple example, but any of our merge tags would work. Like the “translate content” and “share this with others” or the “see most recent campaigns” merge tags.

Do you use a CMS to publish news to your website? Wouldn’t it be nice if you could magically turn those web pages into HTML emails, then send them through MailChimp? Booyah:

Select the “Import from URL” tab when you build a MailChimp campaign, then give us the URL to your web page. We’ll surf across the world wide cybertubes, grab the web page, turn it into an HTML email, and then stick a proper unsubscribe link in the footer (if you didn’t already put one there).

Be sure to read Part 2 of this feature for Advanced Tricks (email stylesheets and conditional content)

Avatar for admin

Upload Email Campaign by ZIP File

Posted by Ben on


If you’re a web designer, you probably prefer to just code your own HTML emails, rather than use one of our built-in templates and WYSIWYG. We totally understand.

So we made it really easy to get your beautiful work loaded into MailChimp with our “Upload ZIP file” button.

Just take all your files, put them into a neat little folder (you can even organize your assets into as many sub-folders as you want), then compress everything into one .ZIP file.

Choose the “paste/Import HTML” tab when building a campaign, then click the “Import Zip file” button.  Upload it to MailChimp, and we’ll extract everything and turn it into an HTML email. We’ll even host your images on our server (free), and prep it for delivery.

All you have to do now is hit the “Send” button.

Avatar for admin

Auto-Update Lists When Importing

Posted by Ben on


If you manage a database externally from MailChimp, you don’t want to keep creating new lists in MailChimp every time you want to send a new campaign. Tons of lists get hard to manage.

Instead, sometimes you just want to log in to MailChimp, copy-paste your most up-to-date version of your list, and then have MailChimp auto-detect whether or not there are any changes to a subscriber’s profile.

So whenever you import your list, check this box in order to do that auto-update:

Hint: this is an extremely powerful option if you’re sync’ing your database with MailChimp via our API. For each campaign you send, you can automatically update your customers’ data (like purchase history, product alerts, etc), then use our advanced merge tags in your campaign to insert dynamic content for each recipient. If you take a moment to think about that, you’ll actually poop your pants, so be careful.


When you send an email campaign from MailChimp, we’ll show you how many people opened the campaign, and how many times they opened. If you want, we’ll even show you who opened the campaign, just in case you want to target them for a followup message.

Now, you can actually see where they’re opening from:

This is a free report you’ll find under your normal email campaign stats, and it’ll make your manager or client totally poop their pants. So be really careful with it.

Here it is in motion: