{ "info": { "author": "Ilya Otyutskiy", "author_email": "ilya.otyutskiy@icloud.com", "bugtrack_url": null, "classifiers": [], "description": "# simplemail\n\n## Overview\n**simplemail** is an easy way to send emails in Python. It will use a sendmail binary which is almost always available and ready to go.\n\n## Dependencies\n- Python 2.6 or 2.7\n\n## Sample usecase\nThe code has docstrings which explains how to use the library. But here's the sample usecase I just made up for showing you the benefits and simplicity of using it.\n\nLet's assume that you have a general announcement which you would like to send out to your mailing list. The message itself is common for every member of your list, but you want to greet every person by his or her name in the beginning of your message.\n\nSo you have a list of your customer in a dictionary.\n\n from simplemail import Simplemail\n\n mailinglist = {\"Bob\": \"bob@domain.tld\",\n \"Alice\": \"alice@domain.tld\"}\n\nLet's fire the default settings for all our emails.\n\n message = Simplemail(sender=\"Maillist Owner \",\n subject=\"Monthly announcement\")\n\nNext you are going to write a default message body for everyone.\n\n body = \"We are proudly to present our new feature.\"\n\nLet's compose a personal greeting for every member of your list and fire an email.\n\n for person in mailinglist.keys():\n gr = \"Hello, %s\\n\\n%s\" % (person, body)\n message.send(recipient=mailinglist[person], body=gr)\n\nNow you have a personal greeting for all of your subscribers.\n\n## HTML emails\nYou can add an optional HTML-view of your email with the html variable. E.g.:\n\n from simplemail import Simplemail\n\n body = \"Hi!\"\n html = \"Hi!\"\n\n message = Simplemail(sender=\"You \", recipient=[\"your@mail\"], subject=\"html test\")\n message.send(body=body, html=html)\n\n## Logging handler\nThere is a special logging handler which utilizes the simplemail library. Here's a code sample:\n\n import logging\n from simplemail import Simplemail\n from simplemail.handlers import SimplemailLogger\n\n # Initializing Simplemail\n mail = Simplemail(sender=\"Application Error \",\n recipient=[\"you@domain.tld\"])\n\n # Initializing logger\n logger = logging.getLogger()\n logger.setLevel(logging.DEBUG)\n logger.propagate = False\n # Sending SimplemailLogger the Simplemail object, application name\n # and the treshold\n sl = SimplemailLogger(mail, __name__, logging.WARNING)\n logger.addHandler(sl)\n\n # Writing to the log\n logger.warn(\"test\")\n\nThe handler's constructor expects three arguments. One is mandatory: **mailobject** is the Simplemail object itself, which needs to be initialized before. Two others are optional: **app** contains your application name, which will be mentioned in the mail subject; and **level** which is the treshold at which the handler will be triggered.\n\n## Downloads\nThis library is available at [PyPi](http://pypi.python.org/pypi/simplemail).\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thesharp/simplemail", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "simplemail", "package_url": "https://pypi.org/project/simplemail/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/simplemail/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/thesharp/simplemail" }, "release_url": "https://pypi.org/project/simplemail/1.0/", "requires_dist": null, "requires_python": null, "summary": "An easy way to send emails in Python", "version": "1.0" }, "last_serial": 1064892, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "55617255b646234a90da5b56493e3437", "sha256": "94e2bcc8e693fa6047b0685f946a91072ba9d96c5de03bcdd4f55f3129639fcc" }, "downloads": -1, "filename": "simplemail-0.1.tar.gz", "has_sig": false, "md5_digest": "55617255b646234a90da5b56493e3437", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3245, "upload_time": "2012-08-18T14:03:52", "url": "https://files.pythonhosted.org/packages/3f/57/cbc895aea11a45e04fec5906f5b88e9611487e570df5ab240c992c7eefb4/simplemail-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "b5fcab52dc14c8b8eaf3b8b45c227a4c", "sha256": "35bf1d321c263babdea53abf023b3776435e8419e56fe428a9f2f6002e6da50d" }, "downloads": -1, "filename": "simplemail-0.2.tar.gz", "has_sig": false, "md5_digest": "b5fcab52dc14c8b8eaf3b8b45c227a4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4126, "upload_time": "2012-09-17T17:23:26", "url": "https://files.pythonhosted.org/packages/62/0b/41e414ee99dc1be0939639d516f0a06c660e7004ead884edf326f2bef391/simplemail-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "2888cc4cdf6181e4d5b9de506eefce3e", "sha256": "3340f65d3ad0ef180f1062ee85456a5eb1522f524f0c5d495057f40a3d73465f" }, "downloads": -1, "filename": "simplemail-0.3.tar.gz", "has_sig": false, "md5_digest": "2888cc4cdf6181e4d5b9de506eefce3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4134, "upload_time": "2012-09-26T15:44:24", "url": "https://files.pythonhosted.org/packages/15/be/6aa54229ee6865bef431ed880bc806e7c0c580819205478150595c833184/simplemail-0.3.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "8244b930d5b05aedba521e4ea3ffe22b", "sha256": "34bca59334892d686dacf0ca3127932f4aaa2fd83ddc06ee5cd6ea2c29e35893" }, "downloads": -1, "filename": "simplemail-1.0.tar.gz", "has_sig": false, "md5_digest": "8244b930d5b05aedba521e4ea3ffe22b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4363, "upload_time": "2014-04-18T23:46:34", "url": "https://files.pythonhosted.org/packages/b4/1c/1b106146033448251268baa9612157a8ca8941d76538f344ccac88d5816b/simplemail-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8244b930d5b05aedba521e4ea3ffe22b", "sha256": "34bca59334892d686dacf0ca3127932f4aaa2fd83ddc06ee5cd6ea2c29e35893" }, "downloads": -1, "filename": "simplemail-1.0.tar.gz", "has_sig": false, "md5_digest": "8244b930d5b05aedba521e4ea3ffe22b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4363, "upload_time": "2014-04-18T23:46:34", "url": "https://files.pythonhosted.org/packages/b4/1c/1b106146033448251268baa9612157a8ca8941d76538f344ccac88d5816b/simplemail-1.0.tar.gz" } ] }