added first day of employment to email subject
This commit is contained in:
parent
619b846f3a
commit
f4e05a0799
|
@ -141,25 +141,26 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView):
|
|||
context = {'data': self.beautify_data(newdata), 'contact': contact}
|
||||
firstname = data['firstname']
|
||||
lastname = data['lastname']
|
||||
firstday = data['firstdate_employment']
|
||||
try:
|
||||
mail_template = get_template(f'evapp/department_mail.txt')
|
||||
if settings.MAILTEST:
|
||||
send_mail(
|
||||
f'EVA: Neuzugang {firstname} {lastname} (MAILTEST)',
|
||||
f'EVA: Neuzugang {firstname} {lastname} {firstday} (MAILTEST)',
|
||||
mail_template.render(context),
|
||||
EVA_MAIL,
|
||||
[EVA_MAIL],
|
||||
fail_silently=False)
|
||||
elif department != "SUBMITTER":
|
||||
send_mail(
|
||||
f'EVA: Neuzugang {firstname} {lastname}',
|
||||
f'EVA: Neuzugang {firstname} {lastname} {firstday}',
|
||||
mail_template.render(context),
|
||||
EVA_MAIL,
|
||||
[MAILS[department]['MAIL']],
|
||||
fail_silently=False)
|
||||
else:
|
||||
send_mail(
|
||||
f'EVA: Neuzugang {firstname} {lastname}',
|
||||
f'EVA: Neuzugang {firstname} {lastname} {firstday}',
|
||||
mail_template.render(context),
|
||||
EVA_MAIL,
|
||||
[contact],
|
||||
|
|
Loading…
Reference in New Issue