WIP: contrôle cotisation

This commit is contained in:
Adrien Bourmault 2022-09-14 23:50:59 +02:00
parent f73833b3e9
commit a2088d7745
No known key found for this signature in database
GPG Key ID: 6EB408FE0ACEC664
5 changed files with 7 additions and 7 deletions

View File

@ -3,5 +3,5 @@ From: =?UTF-8?Q?Tr=c3=a9sorier_de_Libre_en_Communs?= <tresorier@a-lec.org>
To: <COURRIEL_COTISANT> To: <COURRIEL_COTISANT>
Subject: =?UTF-8?Q?=5bTr=c3=a9sorerie=5d_-_modalit=c3=a9s_de_r=c3=a8glement_de_vo?= Subject: =?UTF-8?Q?=5bTr=c3=a9sorerie=5d_-_modalit=c3=a9s_de_r=c3=a8glement_de_vo?=
=?UTF-8?Q?tre_cotisation_ANNEE_CIVILE?= =?UTF-8?Q?tre_cotisation_ANNEE_CIVILE?=
Content-Type: text/plain; charset=UTF-8; format=flowed Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable Content-Transfer-Encoding: quoted-printable

View File

@ -2,5 +2,5 @@ From: tresorier@a-lec.org
To: tresorier@a-lec.org To: tresorier@a-lec.org
Subject: Suivi automatique des cotisations Subject: Suivi automatique des cotisations
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable Content-Transfer-Encoding: quoted-printable

View File

@ -1,4 +1,4 @@
--------------3yxkFgv0AINs5nd0i6BJrWaV --------------3yxkFgv0AINs5nd0i6BJrWaV
Content-Type: application/pdf; name="Recu_cotisation_ANNEE-CIVILE.pdf" Content-Type: application/pdf; name="Recu.pdf"
Content-Disposition: attachment; filename="Recu_cotisation_ANNEE-CIVILE.pdf" Content-Disposition: attachment; filename="Recu.pdf"
Content-Transfer-Encoding: base64 Content-Transfer-Encoding: base64

View File

@ -9,5 +9,5 @@ Content-Type: multipart/mixed; boundary="------------3yxkFgv0AINs5nd0i6BJrWaV"
This is a multi-part message in MIME format. This is a multi-part message in MIME format.
--------------3yxkFgv0AINs5nd0i6BJrWaV --------------3yxkFgv0AINs5nd0i6BJrWaV
Content-Type: text/plain; charset=UTF-8; format=flowed Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable Content-Transfer-Encoding: quoted-printable

View File

@ -106,7 +106,7 @@ def sendmail_with_attachment(headers, data, attachment_header, attachment, endin
+ quopri.encodestring(bytes(data, 'utf-8')) \ + quopri.encodestring(bytes(data, 'utf-8')) \
+ bytes(attachment_header + "\n", 'utf-8') \ + bytes(attachment_header + "\n", 'utf-8') \
+ base64.b64encode(attachment) \ + base64.b64encode(attachment) \
+ bytes(ending + "\n", 'utf-8') + bytes(ending, 'utf-8')
subprocess.run([SENDMAIL_LOCATION, "-t", "-oi"], input=msg) subprocess.run([SENDMAIL_LOCATION, "-t", "-oi"], input=msg)
@ -342,7 +342,7 @@ def validate(member):
data = attachment.read() data = attachment.read()
attachment.close() attachment.close()
ending = "\n--------------3yxkFgv0AINs5nd0i6BJrWaV--" ending = "--------------3yxkFgv0AINs5nd0i6BJrWaV--"
sendmail_with_attachment(mailheaders, mailtext, mailtattach, data, ending) sendmail_with_attachment(mailheaders, mailtext, mailtattach, data, ending)