firstname lastname added to mail subjects
This commit is contained in:
parent
8cd195a336
commit
ed4d47dd40
2
TODO
2
TODO
|
@ -1,3 +1 @@
|
|||
* remove dot before "Nextcloud" at login page.
|
||||
|
||||
* firstname lastname in subject
|
||||
|
|
|
@ -138,19 +138,20 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView):
|
|||
newdata.update({k: v for k, v in data.items() if (k in MAILS[department]['DATA'])})
|
||||
|
||||
context = {'data': self.beautify_data(newdata), 'contact': contact}
|
||||
|
||||
firstname = data['firstname']
|
||||
lastname = data['lastname']
|
||||
try:
|
||||
mail_template = get_template(f'evapp/department_mail.txt')
|
||||
if settings.MAILTEST:
|
||||
send_mail(
|
||||
'EVA: Neuzugang (MAILTEST)',
|
||||
f'EVA: Neuzugang {firstname} {lastname} (MAILTEST)',
|
||||
mail_template.render(context),
|
||||
EVA_MAIL,
|
||||
[EVA_MAIL, contact],
|
||||
fail_silently=False)
|
||||
else:
|
||||
send_mail(
|
||||
'EVA: Neuzugang',
|
||||
f'EVA: Neuzugang {firstname} {lastname}',
|
||||
mail_template.render(context),
|
||||
EVA_MAIL,
|
||||
[MAILS[department]['MAIL'], contact],
|
||||
|
|
Loading…
Reference in New Issue