forked from DGNum/gestioCOF
Remove custommail in gestioncof
This commit is contained in:
parent
b03cf05ef7
commit
561a121e04
1 changed files with 9 additions and 3 deletions
|
@ -4,7 +4,6 @@ from datetime import timedelta
|
|||
from smtplib import SMTPRecipientsRefused
|
||||
from urllib.parse import parse_qs, urlencode, urlparse, urlunparse
|
||||
|
||||
from custommail.shortcuts import send_custom_mail
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
|
@ -15,8 +14,10 @@ from django.contrib.auth.views import (
|
|||
redirect_to_login,
|
||||
)
|
||||
from django.contrib.sites.models import Site
|
||||
from django.core.mail import send_mail
|
||||
from django.http import Http404, HttpResponse, HttpResponseForbidden
|
||||
from django.shortcuts import get_object_or_404, redirect, render
|
||||
from django.template import loader
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
@ -489,8 +490,13 @@ def notify_new_member(request, member: User):
|
|||
|
||||
# Try to send a welcome email and report SMTP errors
|
||||
try:
|
||||
send_custom_mail(
|
||||
"welcome", "cof@ens.fr", [member.email], context={"member": member}
|
||||
send_mail(
|
||||
"Bienvenue au COF",
|
||||
loader.render_to_string(
|
||||
"gestioncof/mails/welcome.txt", context={"member": member}
|
||||
),
|
||||
"cof@ens.fr",
|
||||
[member.email],
|
||||
)
|
||||
except SMTPRecipientsRefused:
|
||||
messages.error(
|
||||
|
|
Loading…
Reference in a new issue