Fix plain text mail

This commit is contained in:
Götz 2019-04-12 15:26:10 +02:00
parent d111d37736
commit 2878b2c84d
3 changed files with 8 additions and 5 deletions

View File

@ -176,15 +176,16 @@ AUTH_PROFILE_MODULE = 'account_manager.UserProfile'
########################################################################################################################
# EMAIL Config #
########################################################################################################################
EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
EMAIL_FILE_PATH = os.path.join(BASE_DIR, "sent_emails")
# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
# EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
# EMAIL_FILE_PATH = os.path.join(BASE_DIR, "sent_emails")
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_TIMEOUT = 15
EMAIL_HOST = 'smtp.uni-bamberg.de'
EMAIL_PORT = 587
EMAIL_USE_TLS = False
EMAIL_USE_SSL = False
EMAIL_HOST_USER = 'vergesslich@uni-bamberg.de'
DEFAULT_FROM_EMAIL = 'vergesslich@uni-bamberg.de'
SERVER_EMAIL = 'fachschaft-wiai.stuve@uni-bamberg.de'
########################################################################################################################
# Logging Config #

View File

@ -24,5 +24,8 @@ urlpatterns = [
path('', include('account_manager.urls')),
path('admin/', admin.site.urls),
path('accounts/login/', auth_views.LoginView.as_view(redirect_authenticated_user=True), name='login'),
path('accounts/password_reset/',
auth_views.PasswordResetView.as_view(html_email_template_name='registration/password_reset_email.html'),
name='password_reset'),
path('accounts/', include('django.contrib.auth.urls')),
]

View File

@ -1,6 +1,5 @@
<p>Es wurde Passwort zurücksetzen für den Account mit der E-Mail {{ email }} angefordert</p>
<p>Wenn Sie keine Mail angefordert haben, ignorieren Sie diese.</p>
<p>Der Link ist nur <strong>{{ expiration_days }} Tage</strong> gültig!</p>
<p>Bitte klicke auf den folgenden Link um Ihr Password zurückzusetzen</p>
<a href="{{ protocol }}://{{ domain }}{{ url('ldap_password_reset_confirm', kwargs={'uidb64':uid, 'token':token}) }}">
{{ protocol }}://{{ domain }}{{ url('ldap_password_reset_confirm', kwargs={'uidb64':uid, 'token':token}) }}