Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A Django email backend for Amazon Simple Email Service, backed by celery
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Sea Cucumber 1.0

Info:A Django email backend for Amazon Simple Email Service, backed by django-celery
Author: DUO Interactive, LLC
Inspired by:Harry Marr's django-ses.

A bird's eye view

Sea Cucumber is a mail backend for Django. Instead of sending emails through a traditional SMTP mail server, Sea Cucumber routes email through Amazon Web Services' excellent Simple Email Service (SES) via django-celery.

Why SES instead of SMTP?

Configuring, maintaining, and dealing with some complicated edge cases can be time-consuming. Sending emails with Sea Cucumber might be attractive to you if:

  • You don't want to maintain mail servers.
  • Your mail server is slow or unreliable, blocking your views from rendering.
  • You need to send a high volume of email.
  • You don't want to have to worry about PTR records, Reverse DNS, email whitelist/blacklist services.
  • You are already deployed on EC2 (In-bound traffic to SES is free from EC2 instances). This is not a big deal either way, but is an additional perk if you happen to be on AWS.


Assuming you've got Django and django-celery installed, you'll need Boto 2.0b4 or higher. boto is a Python library that wraps the AWS API.

You can do the following to install boto 2.0b4 (we're using --upgrade here to make sure you get 2.0b4):

pip install --upgrade boto

Install Sea Cucumber:

pip install seacucumber

Add the following to your

EMAIL_BACKEND = 'seacucumber.backend.SESBackend'

# These are optional -- if they're set as environment variables they won't
# need to be set here as well

# Make sure to do this if you want the ``ses_address`` management command.

Email Address Verification

Before you can send email 'from' an email address through SES, you must first verify your ownership of it:

./ ses_address verify

After you've run the verification above you will need to check the email account's inbox (from your mail client or provider's web interface) and click the authorization link in the email Amazon sends you. After that, your address is ready to go.

To confirm the verified email is ready to go:

./ ses_address list

To remove a previously verified address:

./ ses_address delete

Now, when you use django.core.mail.send_mail from a verified email address, Sea Cucumber will handle message delivery.

Django Builtin-in Error Emails

If you'd like Django's Builtin Email Error Reporting to function properly (actually send working emails), you'll have to explicitly set the SERVER_EMAIL setting to one of your SES-verified addresses. Otherwise, your error emails will all fail and you'll be blissfully unaware of a problem.

Note: You can use the included ses_address management command to handle address verification.

Getting Help

If you have any questions, feel free to either post them to our issue tracker, or visit us on IRC at:
Something went wrong with that request. Please try again.