Skip to content
An email list subscription service
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README.rst L10n support for emails, and a lot of refactoring to support it. Aug 19, 2010



Stores email list subscriptions, and can send emails to those lists.


  • Python 2.6
  • MySQL


Get the code

git clone

Make a virtualenv

Using virualenvwrapper:

mkvirtualenv basket

Install packages

pip install -r requirements/prod.txt -r requirements/compiled.txt

For developers:

pip install -r requirements/dev.txt


Create a file. Typical settings can be found in NOTE: make sure you have from settings import * at the top, or you'll be confused when things aren't working correctly.

Database schema

./ syncdb --noinput

Production environments

Production installs often have a few different requirements:

Collecting Emails

Send a POST request to /subscriptions/subscribe/ with the following fields

  • email address
  • campaign ID
  • locale (optional, defaults to en-US)
  • active (optional, defaults to True)
  • source, i.e. source page URL (optional)

Sending Emails

After collecting emails, you'll also want to send some. To do that, first set your outgoing email settings appropriately in

Then, create an email. See ./emails/ for examples.

To send an email to a campaign, run:

./ sendmail --email campaignname [other_campaignnames ...]

For example, to send the Firefox Home instructions email, you'd run:

./ sendmail --email emails.home.Initial firefox-home-instructions

You can run this as a cron job, as no-one will receive the same email twice, unless the --force option is set.

Advanced emailing

If you require special logic for sending your email, you can subclass emailer.Emailer in a module of your choice (recommended: inside libs/custom_emailers). Set the emailer_class field accordingly for the applicable email (see emails.home.Reminder for an example).

When you run the sendmail command above, your Emailer will be used instead of the default one.

Something went wrong with that request. Please try again.