FEATURE: send email to admins when a new user subscribe #41

This commit is contained in:
nobohan
2023-08-16 10:46:32 +02:00
parent d5a55aa4c3
commit 044a4c0a68
4 changed files with 21 additions and 9 deletions

View File

@@ -17,7 +17,7 @@ DEBUG = false
SQLALCHEMY_DEBUG_LEVEL = 'WARNING'
# URL_APPLICATION = "http://mydomain.org" # Replace mydomain.org by your domain
URL_APPLICATION = "http://taxhub:5000"
URL_APPLICATION = "https://localhost:8080/"
API_TAXHUB = "http://taxhub:5000/api/"
# API_TAXHUB = "http://mytaxhub.org/api/" # Replace mytaxhub.org by your TaxHub url
@@ -48,7 +48,7 @@ REWARDS_ENABLED = false
USE_CONFIRM_EMAIL = true
SUBJECT = "Activez votre compte"
FROM = '"Biommap" <contact@geonature-citizen.fr>'
HTML_TEMPLATE = '''<p> Bonjour,</p><br /><p>Nous vous confirmons que votre compte a bien été créé.</p>
HTML_TEMPLATE = '''<p> Bonjour,</p><br /><p>Nous vous confirmons que votre compte Biommap a bien été créé.</p>
<p> Afin d'activer votre compte veuillez <a href="{activate_url}">cliquer ici.</a>
<p>Nous vous souhaitons la bienvenue sur notre site.</p><br />
<p>Bien à vous.</p>
@@ -61,10 +61,15 @@ REWARDS_ENABLED = false
[MAIL]
MAIL_USE_SSL = false
MAIL_STARTTLS = true
MAIL_HOST = 'smtpd host'
MAIL_PORT = 493 # mandatory SSL port
MAIL_AUTH_LOGIN = 'smtpd/relay host username'
MAIL_AUTH_PASSWD = 'smtpd/relay host password'
MAIL_HOST = 'mail.easter-eggs.com'
MAIL_PORT = 587 # mandatory SSL port
MAIL_AUTH_LOGIN = 'julien.minet@champs-libres.coop'
MAIL_AUTH_PASSWD = 'Bomel2164'
ADMIN_MESSAGE = '''<p>Bonjour administrateur,</p><br />
<p>Un nouvel utilisateur de Biommap avec le nom d'utilisateur "{newuser_username}" a été créé!</p>
<p>Vous pouvez gérer cet utilisateur dans l'espace d'administration.</p><br />
<p>Bonne journée</p>
'''
# API flasgger main config