2023-07-17 06:54:30 +00:00
|
|
|
from common.tasks import send_mail_async
|
2021-05-31 09:20:38 +00:00
|
|
|
from .base import BackendBase
|
|
|
|
|
|
|
|
|
|
|
|
class Email(BackendBase):
|
|
|
|
account_field = 'email'
|
|
|
|
is_enable_field_in_settings = 'EMAIL_HOST_USER'
|
|
|
|
|
2021-08-24 06:20:54 +00:00
|
|
|
def send_msg(self, users, message, subject):
|
2021-05-31 09:20:38 +00:00
|
|
|
accounts, __, __ = self.get_accounts(users)
|
2024-08-14 11:20:29 +00:00
|
|
|
if not accounts:
|
|
|
|
return
|
2023-07-17 14:13:58 +00:00
|
|
|
send_mail_async(subject, message, accounts, html_message=message)
|
2021-08-24 06:20:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
backend = Email
|