diff --git a/personalsite/settings.py.example b/personalsite/settings.py.example index 32d271a..2e3fd34 100644 --- a/personalsite/settings.py.example +++ b/personalsite/settings.py.example @@ -131,6 +131,10 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'core/static') MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') +# Incoming Email +E_NOREPLAY = 'noreply@example.com' +E_INCOMING = 'user@example.com' + # Email config EMAIL_HOST = 'smtp.example.com' EMAIL_HOST_USER = 'username' diff --git a/project/views.py b/project/views.py index 381985c..4a284f8 100644 --- a/project/views.py +++ b/project/views.py @@ -3,6 +3,10 @@ from django.urls import reverse from django.core.mail import EmailMessage from .models import Project from .forms import ContactForm +from personalsite.settings import ( + E_INCOMING, + E_NOREPLAY +) def home(request): @@ -20,8 +24,8 @@ def home(request): msg = EmailMessage( "Personal-Site: Nuevo mensaje", "De {} <{}>\n\nEscribió:\n\n{}".format(name, email, content), - "noreply@heckyel.ga", - ["heckyel@riseup.net"], + E_NOREPLAY, + [E_INCOMING], reply_to=[email], ) try: