fix contact form

This commit is contained in:
j 2021-10-26 17:51:21 +01:00
parent 5ff91dbf9a
commit 49a8d20a48

View file

@ -14,7 +14,7 @@ def index(request):
message = 'From: %s\n\n%s' % (form.cleaned_data['email'], form.cleaned_data['message'])
subject = 'Phantas.ma/polis contact message'
from_ = settings.CONTACT_FROM_EMAIL
to = settings.CONTACT_TO_EMAIL
to = [settings.CONTACT_TO_EMAIL]
msg = EmailMessage(subject, message, from_, to, reply_to=[form.cleaned_data['email']])
msg.send(fail_silently=True)
context['submitted'] = True