1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-21 03:58:23 +02:00

Automatically create mailing lists

This commit is contained in:
Yohann D'ANELLO
2020-10-09 13:49:09 +02:00
parent 798c8db781
commit 92e66d75ab
5 changed files with 36 additions and 2 deletions

13
corres2math/lists.py Normal file
View File

@ -0,0 +1,13 @@
import os
from sympasoap import Client
_client = None
def get_sympa_client() -> Client:
global _client
if _client is None:
_client = Client("https://" + os.getenv("SYMPA_URL"))
_client.login(os.getenv("SYMPA_EMAIL"), os.getenv("SYMPA_PASSWORD"))
return _client