WIP: contrôle cotisation
This commit is contained in:
parent
e34a370810
commit
f73833b3e9
|
@ -16,7 +16,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import os, requests, json, datetime, shutil, quopri, subprocess
|
import os, requests, json, datetime, shutil, quopri, subprocess, base64
|
||||||
from requests.auth import HTTPBasicAuth
|
from requests.auth import HTTPBasicAuth
|
||||||
from requests.auth import HTTPDigestAuth
|
from requests.auth import HTTPDigestAuth
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ def sendmail_with_attachment(headers, data, attachment_header, attachment, endin
|
||||||
msg = bytes(headers + "\n", 'utf-8') \
|
msg = bytes(headers + "\n", 'utf-8') \
|
||||||
+ 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(attachment) \
|
+ base64.b64encode(attachment) \
|
||||||
+ bytes(ending + "\n", 'utf-8')
|
+ bytes(ending + "\n", 'utf-8')
|
||||||
|
|
||||||
subprocess.run([SENDMAIL_LOCATION, "-t", "-oi"], input=msg)
|
subprocess.run([SENDMAIL_LOCATION, "-t", "-oi"], input=msg)
|
||||||
|
|
Loading…
Reference in New Issue