Email spacing cleanups

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2016-11-22 10:37:47 -05:00
parent 1e767dbfe9
commit 5cb66f7a7f
1 changed files with 3 additions and 4 deletions

View File

@ -8,7 +8,7 @@ import textwrap
smtp = smtplib.SMTP("localhost")
reply = "--- Reply above this line ---".ljust(40)
reply = "--- Reply above this line ---"
def mail_thread(thread):
if not thread.is_member():
@ -16,12 +16,11 @@ def mail_thread(thread):
if (thread.unread_count() == 0) or (thread.unread_count() == None):
return
header = ("thread=%s" % thread.id()).rjust(40)
header = "%s%s" % (reply, header)
header = "%s thread=%s" % (reply, thread.id())
text = [ header, "" ]
for message in thread.read():
text += [ str(message) ]
text += [ "\n", thread.url(slack.url()) ]
text += [ thread.url(slack.url()) ]
print("\n".join(text))
print()