{ "info": { "author": "xepa4ep", "author_email": "vumhtam@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Topic :: Communications :: Email :: Email Clients (MUA)" ], "description": "Non-blocking smtp client to work with tornado web framework 4.0 and above\n\nThis library is a port of Python smtplib to tornado non-blocking IOstream implementation.\n\nThe below example was taken and modified from Python docs' example::\n\n #!/usr/bin/env python3\n\n from tornado_smtpclient import client \n\n from email.mime.multipart import MIMEMultipart\n from email.mime.text import MIMEText\n\n # create SMTP client\n s = client.SMTPAsync()\n yield s.connect('your.email.host',587)\n yield s.starttls()\n yield s.login('username', 'password')\n\n # me == my email address\n # you == recipient's email address\n me = \"my@email.com\"\n you = \"your@email.com\"\n\n # Create message container - the correct MIME type is multipart/alternative.\n msg = MIMEMultipart('alternative')\n msg['Subject'] = \"Link\"\n msg['From'] = me\n msg['To'] = you\n\n # Create the body of the message (a plain-text and an HTML version).\n text = \"Hi!\\nHow are you?\\nHere is the link you wanted:\\nhttp://www.python.org\"\n html = \"\"\"\\\n \n
\n \nHi!
\n How are you?
\n Here is the link you wanted.\n