text: from django.core.mail.backends.base import BaseEmailBackend
  
  from .tasks import send_email
  
  
  class RQEmailBackend(BaseEmailBackend):
      def __init__(self, fail_silently=False, **kwargs):
          super(RQEmailBackend, self).__init__(fail_silently)
          self.init_kwargs = kwargs
  
      def send_messages(self, email_messages, **kwargs):
          results = []
          kwargs['_backend_init_kwargs'] = self.init_kwargs
          for msg in email_messages:
              results.append(send_email.delay(msg, **kwargs))
          return results
  