Skip to content

Abstract email sending #12

@kevinrenskers

Description

@kevinrenskers

Currently the digest command is hard-coded to work with the EmailChannel. And the EmailChannel is hardcoded to use Django's send_mail. This makes it really hard to make a new channel that would send email via Celery for example.

  1. It would be great if the actual sending of the email within EmailChannel could be moved to a class method, which could be overridden by a subclass, like CeleryEmailChannel. This method would receive all necessary data to send the email, like recipient, subject, html and plain text, etc.
  2. The digest sending functionality should work for ANY registered channels which work with frequencies.
  3. We should probably rename send_email_now to send_now and send_digest_emails to send_digest. Because we might have channels, that use digest frequencies, that have nothing to do with email.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions