mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
feat: Ajout d'un nouveau status avec envoi de mandat SEPA + envoi de
This commit is contained in:
@ -26,7 +26,6 @@ def envoieReinitMotDePasse(recipients, code):
|
||||
def sendRegisterForm(recipients, establishment_id):
|
||||
errorMessage = ''
|
||||
try:
|
||||
print(f'{settings.EMAIL_HOST_USER}')
|
||||
# Préparation du contexte pour le template
|
||||
EMAIL_INSCRIPTION_SUBJECT = '[N3WT-SCHOOL] Dossier Inscription'
|
||||
context = {
|
||||
@ -47,6 +46,29 @@ def sendRegisterForm(recipients, establishment_id):
|
||||
|
||||
return errorMessage
|
||||
|
||||
def sendMandatSEPA(recipients, establishment_id):
|
||||
errorMessage = ''
|
||||
try:
|
||||
# Préparation du contexte pour le template
|
||||
EMAIL_INSCRIPTION_SUBJECT = '[N3WT-SCHOOL] Mandat de prélèvement SEPA'
|
||||
context = {
|
||||
'BASE_URL': settings.BASE_URL,
|
||||
'email': recipients,
|
||||
'establishment': establishment_id
|
||||
}
|
||||
|
||||
subject = EMAIL_INSCRIPTION_SUBJECT
|
||||
html_message = render_to_string('emails/sepa.html', context)
|
||||
plain_message = strip_tags(html_message)
|
||||
from_email = settings.EMAIL_HOST_USER
|
||||
|
||||
send_mail(subject, plain_message, from_email, [recipients], html_message=html_message)
|
||||
|
||||
except Exception as e:
|
||||
errorMessage = str(e)
|
||||
|
||||
return errorMessage
|
||||
|
||||
def envoieRelanceDossierInscription(recipients, code):
|
||||
EMAIL_RELANCE_SUBJECT = '[N3WT-SCHOOL] Relance - Dossier Inscription'
|
||||
EMAIL_RELANCE_CORPUS = 'Bonjour,\nN\'ayant pas eu de retour de votre part, nous vous renvoyons le lien vers le formulaire d\'inscription : ' + BASE_URL + '/users/login\nCordialement'
|
||||
|
||||
Reference in New Issue
Block a user