Skip to content
Snippets Groups Projects
Commit 4e1c6219 authored by Bodor Máté's avatar Bodor Máté
Browse files

Add email

parent d17d75a8
No related branches found
No related tags found
No related merge requests found
from django.core import exceptions from django.core import exceptions
from django.http import HttpResponseServerError from django.http import HttpResponseServerError
from django.core.mail import send_mail
from . import models from . import models
...@@ -10,3 +11,4 @@ def create_profile(backend, user, response, *args, **kwargs): ...@@ -10,3 +11,4 @@ def create_profile(backend, user, response, *args, **kwargs):
user.profile user.profile
except exceptions.ObjectDoesNotExist: except exceptions.ObjectDoesNotExist:
models.Profile.objects.create(user=user) models.Profile.objects.create(user=user)
send_mail('TESZT', 'Attiss meleg!4!!', 'noreply@keszkepzes.sch.bme.hu', user.email)
...@@ -158,3 +158,7 @@ STATIC_URL = '/django-static/' ...@@ -158,3 +158,7 @@ STATIC_URL = '/django-static/'
MEDIA_ROOT = os.getenv('MEDIA_ROOT', '/tmp') MEDIA_ROOT = os.getenv('MEDIA_ROOT', '/tmp')
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
EMAIL_HOST = 'mail.sch.bme.hu'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment