WIP: contrôle cotisation
This commit is contained in:
parent
f73833b3e9
commit
a2088d7745
|
@ -3,5 +3,5 @@ From: =?UTF-8?Q?Tr=c3=a9sorier_de_Libre_en_Communs?= <tresorier@a-lec.org>
|
|||
To: <COURRIEL_COTISANT>
|
||||
Subject: =?UTF-8?Q?=5bTr=c3=a9sorerie=5d_-_modalit=c3=a9s_de_r=c3=a8glement_de_vo?=
|
||||
=?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
|
|
@ -2,5 +2,5 @@ From: tresorier@a-lec.org
|
|||
To: tresorier@a-lec.org
|
||||
Subject: Suivi automatique des cotisations
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Type: text/plain; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
|
@ -1,4 +1,4 @@
|
|||
--------------3yxkFgv0AINs5nd0i6BJrWaV
|
||||
Content-Type: application/pdf; name="Recu_cotisation_ANNEE-CIVILE.pdf"
|
||||
Content-Disposition: attachment; filename="Recu_cotisation_ANNEE-CIVILE.pdf"
|
||||
Content-Type: application/pdf; name="Recu.pdf"
|
||||
Content-Disposition: attachment; filename="Recu.pdf"
|
||||
Content-Transfer-Encoding: base64
|
|
@ -9,5 +9,5 @@ Content-Type: multipart/mixed; boundary="------------3yxkFgv0AINs5nd0i6BJrWaV"
|
|||
|
||||
This is a multi-part message in MIME format.
|
||||
--------------3yxkFgv0AINs5nd0i6BJrWaV
|
||||
Content-Type: text/plain; charset=UTF-8; format=flowed
|
||||
Content-Type: text/plain; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
|
@ -106,7 +106,7 @@ def sendmail_with_attachment(headers, data, attachment_header, attachment, endin
|
|||
+ quopri.encodestring(bytes(data, 'utf-8')) \
|
||||
+ bytes(attachment_header + "\n", 'utf-8') \
|
||||
+ base64.b64encode(attachment) \
|
||||
+ bytes(ending + "\n", 'utf-8')
|
||||
+ bytes(ending, 'utf-8')
|
||||
|
||||
subprocess.run([SENDMAIL_LOCATION, "-t", "-oi"], input=msg)
|
||||
|
||||
|
@ -342,7 +342,7 @@ def validate(member):
|
|||
data = attachment.read()
|
||||
attachment.close()
|
||||
|
||||
ending = "\n--------------3yxkFgv0AINs5nd0i6BJrWaV--"
|
||||
ending = "--------------3yxkFgv0AINs5nd0i6BJrWaV--"
|
||||
|
||||
sendmail_with_attachment(mailheaders, mailtext, mailtattach, data, ending)
|
||||
|
||||
|
|
Loading…
Reference in New Issue