Model
* adds new model and mixin * adds new functionality for Mailer class for sending resubmission mails
This commit is contained in:
@@ -398,3 +398,26 @@ class Mailer:
|
||||
msg
|
||||
)
|
||||
|
||||
def send_mail_resubmission(self, obj_identifier, resubmission):
|
||||
""" Send a resubmission mail for a user
|
||||
|
||||
Args:
|
||||
obj_identifier (str): The (resubmitted) object's identifier
|
||||
resubmission (Resubmission): The resubmission
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
context = {
|
||||
"obj_identifier": obj_identifier,
|
||||
"resubmission": resubmission,
|
||||
"EMAIL_REPLY_TO": EMAIL_REPLY_TO,
|
||||
}
|
||||
msg = render_to_string("email/resubmission/resubmission.html", context)
|
||||
user_mail_address = [SUPPORT_MAIL_RECIPIENT]
|
||||
self.send(
|
||||
user_mail_address,
|
||||
_("Resubmission - {}").format(obj_identifier),
|
||||
msg
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user