corrected mail sending with attachment
This commit is contained in:
parent
5ff89e009e
commit
eb079bf3ff
|
|
@ -208,7 +208,7 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView):
|
||||||
subject=f'EVA: Austritt {firstname} {lastname} {lastday}',
|
subject=f'EVA: Austritt {firstname} {lastname} {lastday}',
|
||||||
body=mail_template.render(context),
|
body=mail_template.render(context),
|
||||||
from_email=EVA_MAIL,
|
from_email=EVA_MAIL,
|
||||||
to=[EVA_MAIL],
|
to=[MAILS[department]['MAIL']],
|
||||||
)
|
)
|
||||||
mail.attach(f'Rueckgabe_Arbeitsmittel_{firstname}_{lastname}.pdf', pdf_bytes, 'application/pdf')
|
mail.attach(f'Rueckgabe_Arbeitsmittel_{firstname}_{lastname}.pdf', pdf_bytes, 'application/pdf')
|
||||||
mail.send(fail_silently=False)
|
mail.send(fail_silently=False)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue