WIP: don notification
This commit is contained in:
parent
eaaacf5462
commit
da5409d941
|
@ -85,19 +85,19 @@ def sendmail_with_attachment(headers, data, attachment_header, attachment, endin
|
||||||
|
|
||||||
subprocess.run([SENDMAIL_LOCATION, "-t", "-oi"], input=msg)
|
subprocess.run([SENDMAIL_LOCATION, "-t", "-oi"], input=msg)
|
||||||
|
|
||||||
def notify_unpaid(donor):
|
def notify_unpaid(record):
|
||||||
# Get infos
|
# Get infos
|
||||||
name, surname, address, postal_code, city, email, amount, mode, truc = \
|
name, surname, address, postal_code, city, email, amount, mode, truc = \
|
||||||
get_file_content_all(WORKDIR+"/transition/"+donor).split("\n")
|
get_file_content_all(WORKDIR+"/transition/"+record).split("\n")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
BUF.append("* {} {}, {} €".format(numero, name, amount))
|
BUF.append("* {} {}, {} €".format(record, name, amount))
|
||||||
BUF.append(" NOTIFICATION DONATEUR")
|
BUF.append(" NOTIFICATION DONATEUR")
|
||||||
BUF.append("")
|
BUF.append("")
|
||||||
|
|
||||||
mailtext = get_file_content_all(MODALITY_MAIL) + "\n"
|
mailtext = get_file_content_all(MODALITY_MAIL) + "\n"
|
||||||
mailtext = mailtext.replace("NOM_DONNEUR", name)
|
mailtext = mailtext.replace("NOM_DONNEUR", name)
|
||||||
mailtext = mailtext.replace("NUMERO_DON", str(numero))
|
mailtext = mailtext.replace("NUMERO_DON", str(record))
|
||||||
mailtext = mailtext.replace("MONTANT_DON", amount)
|
mailtext = mailtext.replace("MONTANT_DON", amount)
|
||||||
mailtext = mailtext.replace("MODE_DON", year)
|
mailtext = mailtext.replace("MODE_DON", year)
|
||||||
mailheaders = get_file_content_all(MODALITY_MAIL_HEADERS) + "\n"
|
mailheaders = get_file_content_all(MODALITY_MAIL_HEADERS) + "\n"
|
||||||
|
|
Loading…
Reference in New Issue