diff --git a/.environment-dev b/.environment-dev index 28431a5a1a0e19a984542c4be1f93bf936736c4b..7483545a358f4787bb5bfcad0f80a30edf2bd80a 100644 --- a/.environment-dev +++ b/.environment-dev @@ -5,12 +5,13 @@ DATABASE_PASSWORD=shellvalier DATABASE_PORT=5432 DATABASE_USER=shellvalier DEBUG=true -EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend -EMAIL_HOST= -EMAIL_PORT=25 -EMAIL_HOST_USER= -EMAIL_HOST_PASSWORD= -EMAIL_USE_TLS=false +EMAIL_FROM=valunifier@ipipan.waw.pl +EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend +EMAIL_HOST=zimbra.ipipan.waw.pl +EMAIL_PORT=587 +EMAIL_HOST_USER=valunifier +EMAIL_HOST_PASSWORD=gE7ds6hbGLGHRwm4 +EMAIL_USE_TLS=true EMAIL_USE_SSL=false SECRET_KEY=Ixosoh1iemoh0Heloh1thee5akooboonu5veehae4aikoh2ohg UWSGI_PROCESS_PER_CONTAINER=4 diff --git a/users/utils.py b/users/utils.py index ae63178dd6fd61841290acf7c820d243972e00fe..959ba1ce856c5506b858ee8dd9037a0b30c1ecf8 100644 --- a/users/utils.py +++ b/users/utils.py @@ -2,6 +2,8 @@ from django.core.mail import send_mail from django.utils.translation import gettext as _ from django.template import loader +from shellvalier.environment import get_environment + def send_new_user_email(site, user, use_https): subject = _('Zaproszenie do %s') % (site.name, ) @@ -11,4 +13,4 @@ def send_new_user_email(site, user, use_https): 'domain': site.domain, 'user': user, }) - send_mail(subject, body, from_email=None, recipient_list=[user.email]) + send_mail(subject, body, from_email=get_environment('EMAIL_FROM', default=None), recipient_list=[user.email])