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")