# 63 Mail background sending
* moves mail sending to background using celery
This commit is contained in:
@@ -49,7 +49,7 @@ class Mailer:
|
||||
auth_password=self.auth_password
|
||||
)
|
||||
|
||||
def send_mail_shared_access_removed(self, obj, user):
|
||||
def send_mail_shared_access_removed(self, obj_identifier, user):
|
||||
""" Send a mail if user has no access to the object anymore
|
||||
|
||||
Args:
|
||||
@@ -60,14 +60,14 @@ class Mailer:
|
||||
"""
|
||||
context = {
|
||||
"user": user,
|
||||
"obj": obj,
|
||||
"obj_identifier": obj_identifier,
|
||||
"EMAIL_REPLY_TO": EMAIL_REPLY_TO,
|
||||
}
|
||||
msg = render_to_string("email/sharing/shared_access_removed.html", context)
|
||||
user_mail_address = [user.email]
|
||||
self.send(
|
||||
user_mail_address,
|
||||
_("{} - Shared access removed").format(obj.identifier),
|
||||
_("{} - Shared access removed").format(obj_identifier),
|
||||
msg
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user