Commit 6b5b35cb authored by Nicolas Ollinger's avatar Nicolas Ollinger

meilleur support 7 bits

parent deb14892
2020-06-07 11:34:07,028 ==== Début du mailing ====
2020-06-07 11:34:07,217 alice.demo@mailinator.com: OK
2020-06-07 11:34:07,381 bob.demo@mailinator.com: OK
2020-06-07 11:34:07,388 ==== Fin du mailing ====
2020-06-07 14:09:36,684 ==== Début du mailing ====
2020-06-07 14:09:36,874 alice.demo@mailinator.com: OK
2020-06-07 14:09:37,037 bob.demo@mailinator.com: OK
2020-06-07 14:09:37,043 ==== Fin du mailing ====
......@@ -2,6 +2,7 @@
from smtplib import SMTP_SSL
from getpass import getpass
from email.message import EmailMessage
from email.policy import EmailPolicy
from email.utils import formatdate
import csv, logging, json
......@@ -15,7 +16,7 @@ with open('mailing.json') as f:
conf['passwd']=getpass()
def envoie(serveur,port,login,mdp,sujet,corps,emet,dest,pdf_path,filename):
msg=EmailMessage()
msg=EmailMessage(EmailPolicy(utf8=False))
msg['Subject']=sujet
msg['From']=emet
msg['To']=dest
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment