Skip to content

Instantly share code, notes, and snippets.

@brenttaylor
Created October 23, 2012 10:26
Show Gist options
  • Save brenttaylor/3938070 to your computer and use it in GitHub Desktop.
Save brenttaylor/3938070 to your computer and use it in GitHub Desktop.
import smtplib, sys
from email.mime.text import MIMEText
Username = "me@email.com"
Password = "MyPassword"
SMTPServer = "smtp.gmail.com:587"
Sender = "me@email.com"
Recipient = "me@wunderlist.com"
Task = ' '.join(sys.argv[1:])
Bucket = "Inbox"
Server = smtplib.SMTP(SMTPServer)
Message = MIMEText(Task)
Message["Subject"] = Bucket
Message["From"] = Sender
Message["To"] = Recipient
Server.starttls()
Server.login(Username, Password)
Server.sendmail(Sender, [Recipient], Message.as_string())
Server.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment