{ "info": { "author": "Beno\u00eet Bar", "author_email": "bar.benoit@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "==========\nDjango-Template-Mail\n==========\n:Info: A Django application to send email using django's templating system\n:Author: Beno\u00eet Bar (http://github.com/benoitbar, http://twitter.com/benoitbar)\n\nGet started\n===========\n\nInstalling\n----------\n::\n\n pip install django-template-mail\n\nConfigure your mail backend\n---------------------------\n\ndjango-template-mail ships with same backends as Django (https://docs.djangoproject.com/en/dev/topics/email/#email-backends). Just replace **django.core.mail** by **templatemail** ::\n\n EMAIL_BACKEND = 'templatemail.backends.smtp.EmailBackend'\n\nConvert HTML into plain text\n----------------------------\n\nBy default, django-template-backend use a minimalist process to convert HTML into plain text. I suggest you to use **html2text** (https://github.com/aaronsw/html2text) ::\n\n EMAIL_HTML2TEXT = 'html2text.html2text'\n\nYou can also write your own method and use it ::\n\n EMAIL_HTML2TEXT = 'your.module.yourhtml2textmethod'\n\nSending emails\n==============\n\nTo send email with django-template-mail you simply should use the method described in the Django documentation (https://docs.djangoproject.com/en/dev/topics/email/) and replacing the **message** attribute as a tuple **('directory_template/template.html', {'key': 'value'}, context_instance)** ::\n \n from django.core.mail import send_mail\n send_mail( \n 'Welcome', \n (\n 'mail/welcome.html', \n {\n 'username': request.user.username, \n 'full_name': request.user.get_full_name(),\n 'signup_date': request.user.date_joined\n }\n ),\n 'from@example.com', \n ['to@example.com'], \n fail_silently=False\n )\n\ndjango-template-mail looked in django template directories/loaders ::\n\n
Hi {{full_name}},
\n\n You just signed up using:\n
Thanks!
", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/benoitbar/django-template-mail/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-template-mail", "package_url": "https://pypi.org/project/django-template-mail/", "platform": "any", "project_url": "https://pypi.org/project/django-template-mail/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/benoitbar/django-template-mail/" }, "release_url": "https://pypi.org/project/django-template-mail/0.1/", "requires_dist": null, "requires_python": null, "summary": "A Django application to send email using django's templating system", "version": "0.1" }, "last_serial": 724278, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "fd79e25a16e0fd7e9cee2a7f835bb97a", "sha256": "92e117ecc178f6ac242bfdb078d2d1ce6832a913486274dc8dc842665a7b3a88" }, "downloads": -1, "filename": "django-template-mail-0.1.tar.gz", "has_sig": false, "md5_digest": "fd79e25a16e0fd7e9cee2a7f835bb97a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4309, "upload_time": "2012-04-21T23:08:25", "url": "https://files.pythonhosted.org/packages/16/8f/ff3c6745cea51316f248f03bb7dd0c948ac92ca8bcb32925c6818cf4036d/django-template-mail-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fd79e25a16e0fd7e9cee2a7f835bb97a", "sha256": "92e117ecc178f6ac242bfdb078d2d1ce6832a913486274dc8dc842665a7b3a88" }, "downloads": -1, "filename": "django-template-mail-0.1.tar.gz", "has_sig": false, "md5_digest": "fd79e25a16e0fd7e9cee2a7f835bb97a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4309, "upload_time": "2012-04-21T23:08:25", "url": "https://files.pythonhosted.org/packages/16/8f/ff3c6745cea51316f248f03bb7dd0c948ac92ca8bcb32925c6818cf4036d/django-template-mail-0.1.tar.gz" } ] }