aboutsummaryrefslogtreecommitdiffstats
path: root/python/mailing_list.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/mailing_list.py')
-rw-r--r--python/mailing_list.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/python/mailing_list.py b/python/mailing_list.py
index 5e7329b5..bbc9d1e1 100644
--- a/python/mailing_list.py
+++ b/python/mailing_list.py
@@ -21,10 +21,10 @@ server = smtplib.SMTP('smtp.gmail.com:587')
server.starttls()
server.login(gmail_login, gmail_password)
-with open("templates/template-2014-07-16.txt") as fh:
+with open("templates/template-2014-08-12.txt") as fh:
s_text = Template(fh.read())
-with open("templates/template-2014-07-16.html") as fh:
+with open("templates/template-2014-08-12.html") as fh:
s_html = Template(fh.read())
attachment_name = 'Serenitas Capital (SCGMF Returns).pdf'
@@ -32,12 +32,13 @@ with open(os.path.join(root, "Pitchbook", attachment_name), 'rb') as fh:
pdf_attach1 = MIMEApplication(fh.read(), 'pdf')
pdf_attach1.add_header('Content-Disposition', 'attachment', filename = attachment_name)
-attachment_name = 'Serenitas Credit Gamma Master Fund - Investor Letter 2Q2014.pdf'
-with open(os.path.join(root, "InvestorLetters", attachment_name), 'rb') as fh:
- pdf_attach2 = MIMEApplication(fh.read(), 'pdf')
-pdf_attach2.add_header('Content-Disposition', 'attachment', filename = attachment_name)
+# attachment_name = 'Serenitas Credit Gamma Master Fund - Investor Letter 2Q2014.pdf'
+# with open(os.path.join(root, "InvestorLetters", attachment_name), 'rb') as fh:
+# pdf_attach2 = MIMEApplication(fh.read(), 'pdf')
+# pdf_attach2.add_header('Content-Disposition', 'attachment', filename = attachment_name)
for email, name, firm in mailing_list:
+ print(email, name, firm)
msg = MIMEMultipart()
msg['Subject'] = 'Serenitas Credit Gamma Master Fund performance update'
msg['From'] = "David Weeks <{0}>".format(gmail_login)
@@ -51,7 +52,7 @@ for email, name, firm in mailing_list:
msg_alternative.attach(MIMEText(s_text.substitute(name = name), 'plain'))
msg_alternative.attach(MIMEText(s_html.substitute(name = name), 'html'))
msg.attach(msg_alternative)
- msg.attach(pdf_attach2)
+ #msg.attach(pdf_attach2)
msg.attach(pdf_attach1)
server.send_message(msg)
server.quit()