kopia lustrzana https://github.com/rtts/django-simplecms
More sensible default email addresses
rodzic
bd2d622db9
commit
764f135785
|
@ -1,5 +1,6 @@
|
|||
import swapper
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core.mail import EmailMessage
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
@ -133,8 +134,7 @@ class ContactForm(forms.Form):
|
|||
return
|
||||
|
||||
email = EmailMessage(
|
||||
to = ['info@' + hostname],
|
||||
from_email = 'noreply@' + hostname,
|
||||
to = [settings.DEFAULT_TO_EMAIL],
|
||||
body = body,
|
||||
subject = _('Contact form at %(hostname)s.') % {'hostname': hostname},
|
||||
headers = {'Reply-To': self.cleaned_data.get('sender')},
|
||||
|
|
|
@ -9,6 +9,7 @@ except ImportError:
|
|||
PROJECT_NAME = 'example'
|
||||
KEYFILE = f'/tmp/{PROJECT_NAME}.secret'
|
||||
ADMINS = [('JJ Vens', 'jj@rtts.eu')]
|
||||
DEFAULT_TO_EMAIL = ADMINS
|
||||
ALLOWED_HOSTS = ['*']
|
||||
ROOT_URLCONF = 'project.urls'
|
||||
WSGI_APPLICATION = 'project.wsgi.application'
|
||||
|
|
Ładowanie…
Reference in New Issue