From d905ebd3759ce2f610d57c6269178140593238d2 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Thu, 28 May 2015 12:25:01 -0400 Subject: [PATCH] Remove X-Slack-Channel from email headers Turns out, gmail doesn't preserve this when replying to messages. Signed-off-by: Anna Schumaker --- slackmail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slackmail.py b/slackmail.py index f3c452c..c7ee2ef 100644 --- a/slackmail.py +++ b/slackmail.py @@ -19,11 +19,11 @@ for channel in slack.channels.list(): for message in channel.read(): text += [ str(message) ] + text += [ "", "--- Reply above this line ---", "channel=%s" % channel.id() ] print("\n".join(text)) print() msg = MIMEText("\n".join(text)) - msg["X-Slack-Channel"] = channel.id() msg["Subject"] = "[%s] %s" % (slack.team(), channel.name()) msg["From"] = "SlackMail@OcarinaProject.net" msg["To"] = slack.user().email()