On laisse la possibilité que le nom de l'expéditeur soit configuré à autre chose que "cranspasswords".

This commit is contained in:
Vincent Le Gallic 2013-03-07 17:46:05 +01:00
parent 57ff241359
commit ced75bcaed
2 changed files with 3 additions and 2 deletions

View file

@ -136,9 +136,10 @@ def notification(subject,corps,fname,old):
tomail = DEST_MAIL tomail = DEST_MAIL
msg = MIMEMultipart(_charset="utf-8") msg = MIMEMultipart(_charset="utf-8")
msg['Subject'] = subject msg['Subject'] = subject
msg['X-Mailer'] = "cranspasswords"
# me == the sender's email address # me == the sender's email address
# family = the list of all recipients' email addresses # family = the list of all recipients' email addresses
msg['From'] = "cranspasswords <%s>" % CRANSP_MAIL msg['From'] = CRANSP_MAIL
msg['To'] = DEST_MAIL msg['To'] = DEST_MAIL
msg.preamble = "cranspasswords report" msg.preamble = "cranspasswords report"
info = MIMEText(corps + info = MIMEText(corps +

View file

@ -10,7 +10,7 @@ Dans le futur, sera remplacé par une connexion ldap.
STORE = '/root/cranspasswords/db/' STORE = '/root/cranspasswords/db/'
""" Répertoire de stockage """ """ Répertoire de stockage """
CRANSP_MAIL = "root@crans.org" CRANSP_MAIL = "cranspasswords <root@crans.org>"
""" Expéditeur du mail de notification """ """ Expéditeur du mail de notification """
DEST_MAIL = "root@crans.org" DEST_MAIL = "root@crans.org"