Remove X-Slack-Channel from email headers

Turns out, gmail doesn't preserve this when replying to messages.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-05-28 12:25:01 -04:00
parent 5fe26ca0e5
commit d905ebd375
1 changed files with 1 additions and 1 deletions

View File

@ -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()