title: Celery Error with EmailMultiAlternatives
body: <p>I have a wrapper around <code>EmailMultiAlternatives</code> to make the interface a little bit cleaner (taken nearly verbatim from <a href="http://ozkatz.github.io/getting-e-mail-right-with-django-and-ses.html" rel="nofollow noreferrer">here</a>): </p>
  
  <pre><code>class Email(object):
      '''
      Wrapper around the Django core's EmailMultiAlternatives that makes it simpler
      to render txt and html templates.
      '''
  
      def __init__(self, to, subject):
          self.to = to
          self.subject = subject
          self.html = None
          self.text = None
  
      def _render(self, template, context):
          return render_to_string(template, context)
  
      def render_html(self, template, context):
          self.html = self._render(template, context)
  
      def render_text(self, template, context):
          self.text = self._render(template, context)
  
      def send(self, from_addr=None, fail_silently=False):
          if isinstance(self.to, basestring):
              self.to = [self.to]
          if not from_addr:
              from_addr = settings.EMAIL_HOST_USER
          msg = EmailMultiAlternatives(
              self.subject,
              self.text,
              from_addr,
              self.to
          )
          if self.html:
              msg.attach_alternative(self.html, 'text/html')
          msg.send(fail_silently)
  </code></pre>
  
  <p>I call it like this: </p>
  
  <pre><code>   if not self.email:
          warnings.warn('uid:%s has no email address' % self.id)
      else:
          context = Context({
              'first_name': self.first_name,
              'uid': int_to_base36(self.id),
              'token': default_token_generator.make_token(self),
              'domain': Site.objects.get_current().domain
          })
  
          from_email = settings.EMAIL_HOST_USER
          subject = "Password Reset"
          email = Email(to=self.email, subject=subject)
          email.render_text('email/reset_password_email.txt', context)
          email.render_html('email/reset_password_email.html', context)
          email.send()
  </code></pre>
  
  <p>I'm using django-celery-email, which simply provides a wrapper around Django's built in send email function to turn it into a celery worker task. However, when I try to run the code, I get the following error: </p>
  
  <pre><code>TypeError: &lt;django.core.mail.message.EmailMultiAlternatives object at 0x10c20f3d0&gt; is not JSON serializable
  </code></pre>
  
  <p>This occurs within the context of creating the celery task. I'm not sure what's going on here. When I don't use EmailMultiAlternatives and simply use Django's built in send_mail (which also gets wrapped as a celery task by django-celery-email), I don't get the error. Thoughts? </p>