WIP: don notification
This commit is contained in:
parent
81c1742b77
commit
eaaacf5462
|
@ -87,6 +87,8 @@ def sendmail_with_attachment(headers, data, attachment_header, attachment, endin
|
|||
|
||||
def notify_unpaid(donor):
|
||||
# Get infos
|
||||
name, surname, address, postal_code, city, email, amount, mode, truc = \
|
||||
get_file_content_all(WORKDIR+"/transition/"+donor).split("\n")
|
||||
pass
|
||||
|
||||
BUF.append("* {} {}, {} €".format(numero, name, amount))
|
||||
|
@ -101,7 +103,8 @@ def notify_unpaid(donor):
|
|||
mailheaders = get_file_content_all(MODALITY_MAIL_HEADERS) + "\n"
|
||||
mailheaders = mailheaders.replace("COURRIEL_DONNEUR", email)
|
||||
|
||||
sendmail(mailheaders, mailtext)
|
||||
print(mailtext)
|
||||
#sendmail(mailheaders, mailtext)
|
||||
|
||||
def validate(record):
|
||||
|
||||
|
@ -207,7 +210,7 @@ def validate_donors():
|
|||
# Validate record
|
||||
for record in os.listdir(WORKDIR+"/transition"):
|
||||
if not validate(record):
|
||||
print("Ouais faut notifier")
|
||||
notify_unpaid(record)
|
||||
|
||||
def main():
|
||||
setup_workdir()
|
||||
|
|
Loading…
Reference in New Issue