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.
|
* 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'])})
|
newdata.update({k: v for k, v in data.items() if (k in MAILS[department]['DATA'])})
|
||||||
|
|
||||||
context = {'data': self.beautify_data(newdata), 'contact': contact}
|
context = {'data': self.beautify_data(newdata), 'contact': contact}
|
||||||
|
firstname = data['firstname']
|
||||||
|
lastname = data['lastname']
|
||||||
try:
|
try:
|
||||||
mail_template = get_template(f'evapp/department_mail.txt')
|
mail_template = get_template(f'evapp/department_mail.txt')
|
||||||
if settings.MAILTEST:
|
if settings.MAILTEST:
|
||||||
send_mail(
|
send_mail(
|
||||||
'EVA: Neuzugang (MAILTEST)',
|
f'EVA: Neuzugang {firstname} {lastname} (MAILTEST)',
|
||||||
mail_template.render(context),
|
mail_template.render(context),
|
||||||
EVA_MAIL,
|
EVA_MAIL,
|
||||||
[EVA_MAIL, contact],
|
[EVA_MAIL, contact],
|
||||||
fail_silently=False)
|
fail_silently=False)
|
||||||
else:
|
else:
|
||||||
send_mail(
|
send_mail(
|
||||||
'EVA: Neuzugang',
|
f'EVA: Neuzugang {firstname} {lastname}',
|
||||||
mail_template.render(context),
|
mail_template.render(context),
|
||||||
EVA_MAIL,
|
EVA_MAIL,
|
||||||
[MAILS[department]['MAIL'], contact],
|
[MAILS[department]['MAIL'], contact],
|
||||||
|
|
Loading…
Reference in New Issue