mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-09 01:21:49 -05:00
* Implement concrete Notification model for notification runs * Implement NotificationTemplate and Notification serializers and views * Implement ancillary views * Implement NotificationTemplate trigger m2m fields on all job templates via a fields mixin * Link NotificationTemplates with an org * Link notifications with the activity stream * Implement Notification celery tasks * Extend Backend field parameters to identify sender and receiver as parameters needed by the message and not the backend itself * Updates to backends to better fit the django email backend model as it relates to Messages * Implement success job chain task + notifications * Implement notifications in error job chain task
21 lines
836 B
Python
21 lines
836 B
Python
# Copyright (c) 2016 Ansible, Inc.
|
|
# All Rights Reserved.
|
|
|
|
import logging
|
|
|
|
from django.core.mail.backends.smtp import EmailBackend
|
|
|
|
class CustomEmailBackend(EmailBackend):
|
|
|
|
init_parameters = {"host": {"label": "Host", "type": "string"},
|
|
"port": {"label": "Port", "type": "int"},
|
|
"username": {"label": "Username", "type": "string"},
|
|
"password": {"label": "Password", "type": "password"},
|
|
"use_tls": {"label": "Use TLS", "type": "bool"},
|
|
"use_ssl": {"label": "Use SSL", "type": "bool"},
|
|
"sender": {"label": "Sender Email", "type": "string"},
|
|
"recipients": {"label": "Recipient List", "type": "list"}}
|
|
recipient_parameter = "recipients"
|
|
sender_parameter = "sender"
|
|
|