From e7b20230eec770357db23aea042430d9990aa691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Poulain?= Date: Mon, 24 Aug 2020 22:36:13 +0200 Subject: [PATCH] supprime du code mort --- mailing.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/mailing.py b/mailing.py index 2b265b7..cfda686 100755 --- a/mailing.py +++ b/mailing.py @@ -22,9 +22,8 @@ # This program is used to mail a message to several recipients, thus # providing customization for each recipient. -import argparse, csv, sys, re +import argparse, csv, sys import smtplib, time, mimetypes -from email.header import Header from email.message import EmailMessage from jinja2 import Environment, FileSystemLoader, select_autoescape @@ -140,16 +139,6 @@ BCCPATTERN = re.compile(r"^Bcc: *(.*)") REPLYTOPATTERN = re.compile(r"^Reply-To: *(.*)") -def qencode_subject(message): - subjectmatches = re.search(r"^Subject: *(.*)$", message, re.MULTILINE) - if subjectmatches == None: - return message - subjectstr = subjectmatches.group(1) - h = Header(subjectstr, "utf-8") - qsubjectstr = h.encode() - return message.replace(subjectstr, qsubjectstr, 1) - - def send_message(message, to, attachments, args): lines = message.split("\n")