new settings IF_EMAIL

This commit is contained in:
Benni Bärmann 2020-10-07 14:00:08 +02:00
parent 2a33d5bb38
commit 6ddc55e287
2 changed files with 6 additions and 2 deletions

View File

@ -15,6 +15,9 @@ from pathlib import Path
# mails in development go to stdout
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# mail for IF-OTRS
IF_EMAIL = 'if-test@wikimedia.de'
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

View File

@ -3,6 +3,7 @@ from django.forms import modelformset_factory
from django.http import HttpResponse
from formtools.wizard.views import CookieWizardView
from django.core.mail import send_mail
from django.conf import settings
from .forms import ProjectForm, VolunteerForm, LibraryForm, IFGForm
from .models import Project
@ -90,8 +91,8 @@ class ExternView(CookieWizardView):
send_mail(
'form filled',
'you are such a great form filler!',
'if-test@wikimedia.de',
['benni.baermann@wikimedia.de'],
settings.IF_EMAIL,
[form.email],
fail_silently=False,
)
# - mail to IF with link to accept/decline