supprime du code mort
This commit is contained in:
parent
68b053ee91
commit
e7b20230ee
13
mailing.py
13
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")
|
||||
|
Loading…
Reference in New Issue
Block a user