send email to team responsibles, not to the person joining the team
This commit is contained in:
parent
30c56afb83
commit
5c4487d513
|
@ -49,7 +49,7 @@ def send_new_membership_email(membership):
|
|||
return _send_email(
|
||||
text_template='emails/new_membership_email.txt',
|
||||
html_template='emails/new_membership_email.html',
|
||||
recipient=membership.user.email,
|
||||
recipient=[resp.email for resp in membership.team.responsible],
|
||||
formatdict=formatdict,
|
||||
subject='New membership request for {} at {}'.format(
|
||||
membership.team.name,
|
||||
|
|
|
@ -15,13 +15,16 @@ def _send_email(
|
|||
attachment=None,
|
||||
attachment_filename=None
|
||||
):
|
||||
if not isinstance(recipient, list):
|
||||
recipient = [recipient]
|
||||
|
||||
try:
|
||||
# put the basic email together
|
||||
msg = EmailMultiAlternatives(
|
||||
subject,
|
||||
render_to_string(text_template, formatdict),
|
||||
sender,
|
||||
[recipient],
|
||||
recipient,
|
||||
[settings.ARCHIVE_EMAIL]
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue