{ "info": { "author": "Kevin Renskers", "author_email": "info@mixedcase.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "========\nOverview\n========\n\n**Easy to use, class based email for Django.**\n\n\nThe problem\n===========\nThere is no unified way in our Django projects to send email. Django's own email functions require too much boilerplate\ncode and are not intelligent enough. They are also not class based.\n\nSending email should be as easy as creating an instance of the email class, provide one piece of text, and calling the\nsend() method. This is the easiest, most common case. It should also be possible to override base templates,\ngive separate text- and html versions, send the mail to a queue, etc.\n\n\nWhat this class will do for you\n===============================\n- It will send text email if:\n\n 1. there is a custom text template, or\n\n 2. when using default templates, if text_body is set\n\n- It will send html email if:\n\n 1. there is a custom html template, or\n\n 2. when using default templates, if html_body is set\n\n- You can also force to send a text email when there is only a html_body. It will then convert html to text for you.\n\n- You can also force to send a html email when there is only a text_body. It will then convert text to html for you.\n\n\nWhat it doesn't do\n==================\nThis email class doesn't know about mail queues. You can use a custom email backend or a project like\nhttps://github.com/jtauber/django-mailer for that.\n\n\nInstallation\n============\n::\n\n $ pip install django-generic-mail\n\n\nUsage\n=====\n::\n\n from generic_mail import Email\n\n # This will send text email only, uses the email/base_text_email.html template with the \"body\" template variable\n email = Email('to@example.com', 'Subject', 'Line one\\n\\nLine two')\n email.send()\n\n # This will send text- and html email, also with default template\n email = Email('to@example.com', 'Subject', 'Line one\\n\\nLine two', '
Line one
Line two
')\n email.send()\n\n # This will send text- and html email, will convert text to html using Markdown\n email = Email('to@example.com', 'Subject', 'Line one\\n\\nLine two')\n email.send(text=True, html=True)\n\n # This will send html email only\n email = Email('to@example.com', 'Subject', html_body='Line one
Line two
')\n email.send()\n\n # This will send text- and html email, will convert html to text by removing html tags, converting paragraphs and breaks\n email = Email('to@example.com', 'Subject', html_body='Line one
Line two
')\n email.send(text=True, html=True)\n\n # This will send text email only, since there is no body given, the text must be in the templates\n email = Email('to@example.com', 'Subject', text_template='email/my_text_email.html')\n email.send()\n\n # This will send html email only, since there is no body given, the text must be in the templates\n email = Email('to@example.com', 'Subject', html_template='email/my_html_email.html')\n email.send()\n\n # This will send text- and html email, since there is no body given, the text must be in the templates\n email = Email('to@example.com', 'Subject', text_template='email/my_text_email.html', html_template='email/my_html_email.html')\n email.send()\n\n # This will generate an error: when proving only one custom template, you can't send both email versions\n email = Email('to@example.com', 'Subject', html_template='email/my_html_email.html')\n email.send(text=True, html=True)\n\n # This will generate an error: when using default templates, you need to give at least one body (text or html)\n email = Email('to@example.com', 'Subject')\n email.send()\n\n\nSubclassing\n===========\nIf you want to create your own subclass that has different defaults (other templates, subject, etc), the best way to do\nthis is by changing the class properties instead of overriding the ``__init__`` method.", "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/kevinrenskers/django-generic-mail", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-generic-mail", "package_url": "https://pypi.org/project/django-generic-mail/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-generic-mail/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/kevinrenskers/django-generic-mail" }, "release_url": "https://pypi.org/project/django-generic-mail/0.2.3/", "requires_dist": null, "requires_python": null, "summary": "Easy to use, class based email for Django", "version": "0.2.3" }, "last_serial": 789734, "releases": { "0.2": [], "0.2.1": [ { "comment_text": "", "digests": { "md5": "986a20b3283406bbb1fe29495d952d45", "sha256": "42c51467fa9a5439fe761c15d48092a43744f5b29f074d3000606aaaf37f99d4" }, "downloads": -1, "filename": "django-generic-mail-0.2.1.macosx-10.7-x86_64.exe", "has_sig": false, "md5_digest": "986a20b3283406bbb1fe29495d952d45", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 73162, "upload_time": "2011-12-01T14:21:53", "url": "https://files.pythonhosted.org/packages/6e/4f/b551208e247816a0d8d16c32a3b5d4dd207bde2b4b6b21dbad5442d191f2/django-generic-mail-0.2.1.macosx-10.7-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "4c6dfe4900b56dc49675a3de4c99dec9", "sha256": "831103060ea082a9e83250205a2ef808148756838b4a5cec870ec697578cd391" }, "downloads": -1, "filename": "django-generic-mail-0.2.1.tar.gz", "has_sig": false, "md5_digest": "4c6dfe4900b56dc49675a3de4c99dec9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7844, "upload_time": "2011-12-01T14:21:52", "url": "https://files.pythonhosted.org/packages/23/ab/311b1e38c95c8031ea089c75cfb80aafdce6e7d9aa6b329a9baec0a584d7/django-generic-mail-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "f18e8793a17c7bc6995a50ff8b7b4314", "sha256": "e08b1de3917fda72c5bdc49c15d74ed37919fb52765ce3ce78849c63ca52402f" }, "downloads": -1, "filename": "django-generic-mail-0.2.2.macosx-10.7-x86_64.exe", "has_sig": false, "md5_digest": "f18e8793a17c7bc6995a50ff8b7b4314", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 73162, "upload_time": "2011-12-01T14:28:17", "url": "https://files.pythonhosted.org/packages/ac/07/d4551bebe4a18aa8863050b4ee34034a77985274ab4d2d4a717b54e22cb2/django-generic-mail-0.2.2.macosx-10.7-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "a854f7a7c5ff05929b52ae8c969d02eb", "sha256": "dc2085a3cef68530a777140c2852485e6343f6417ef6f3c38abea80372a2d401" }, "downloads": -1, "filename": "django-generic-mail-0.2.2.tar.gz", "has_sig": false, "md5_digest": "a854f7a7c5ff05929b52ae8c969d02eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8235, "upload_time": "2011-12-01T14:28:16", "url": "https://files.pythonhosted.org/packages/d0/32/ae780ad73fe5ed52355f9b2165976693a745186fc65d5b5127f9b4fac4b0/django-generic-mail-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "466fa8b119b55f8d30ebd213076b9614", "sha256": "6a336bd53de84709b18522565796324b1532cf8c7ce762461b41845cb09fd854" }, "downloads": -1, "filename": "django-generic-mail-0.2.3.tar.gz", "has_sig": false, "md5_digest": "466fa8b119b55f8d30ebd213076b9614", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8316, "upload_time": "2012-01-30T16:30:05", "url": "https://files.pythonhosted.org/packages/aa/f5/f4ee0ae973e03eb2109614eb5260a647878feaa705f5f4b9b14e8281dc60/django-generic-mail-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "466fa8b119b55f8d30ebd213076b9614", "sha256": "6a336bd53de84709b18522565796324b1532cf8c7ce762461b41845cb09fd854" }, "downloads": -1, "filename": "django-generic-mail-0.2.3.tar.gz", "has_sig": false, "md5_digest": "466fa8b119b55f8d30ebd213076b9614", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8316, "upload_time": "2012-01-30T16:30:05", "url": "https://files.pythonhosted.org/packages/aa/f5/f4ee0ae973e03eb2109614eb5260a647878feaa705f5f4b9b14e8281dc60/django-generic-mail-0.2.3.tar.gz" } ] }