diff --git a/controle_don/main.py b/controle_don/main.py index 7cc5e5b..047542a 100755 --- a/controle_don/main.py +++ b/controle_don/main.py @@ -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()