chgpass & stats: utilisation du mail_module
This commit is contained in:
parent
7a1c86275f
commit
ddc3820cd6
2 changed files with 5 additions and 7 deletions
|
@ -20,7 +20,6 @@ import gestion.affichage as affichage
|
|||
import lc_ldap.shortcuts
|
||||
import psycopg2
|
||||
import psycopg2.extras
|
||||
import smtplib
|
||||
import gestion.config.upload as upload_config
|
||||
import gestion.config as config
|
||||
from gestion import mail as mail_module
|
||||
|
@ -200,7 +199,7 @@ if __name__ == "__main__":
|
|||
'seuil_upload': upload_config.pretty_seuil,
|
||||
}).as_string()
|
||||
|
||||
mail = smtplib.SMTP('localhost')
|
||||
mail.sendmail(expediteur, destinataire, corps)
|
||||
with mail_module.ServerConnection() as conn:
|
||||
conn.sendmail(expediteur, destinataire, corps)
|
||||
else:
|
||||
print fetched_upload_srv
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue