Fix : cas de non présence du mail, évite de spammer inutilement

This commit is contained in:
Gabriel Detraz 2019-10-06 18:38:43 +02:00 committed by root
parent 8881f853ac
commit b9e3dab6cc

13
main.py
View file

@ -47,12 +47,13 @@ def notif_end_adhesion(api_client):
asso_name=asso_options["name"],
message=result["message"],
link=general_options["main_site_url"])
api_sendmail.send_mail(
general_options["email_from"],
user["get_mail"],
"Avis de fin d'adhésion / End of subscription notice",
reminder_mail
)
if user["get_mail"]:
api_sendmail.send_mail(
general_options["email_from"],
user["get_mail"],
"Avis de fin d'adhésion / End of subscription notice",
reminder_mail
)
## Manual command
if "--force" in sys.argv: