{ "info": { "author": "Chris McKenzie", "author_email": "chrismc@hzdg.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP" ], "description": "django-mailmate\n===============\n\n|Build Status|_\n\n.. |Build Status| image:: https://travis-ci.org/hzdg/django-mailmate.png?branch=master\n.. _Build Status: https://travis-ci.org/hzdg/django-mailmate\n\nMailmate is a Django app comprised of tools to make dealing with emails easier.\nIts main feature is a simple, class-based way to define email messages using\nDjango templates. Here's a quick sales pitch:\n\n.. code-block:: python\n\n from mailmate import TemplatedEmailMessage\n\n class MyEmail(TemplatedEmailMessage):\n to = ['some-user@some-email.com']\n from_email = 'no-reply@some-email.com'\n subject = 'Hello, {{ name }}!'\n template_name = 'emails/template.txt'\n\n MyEmail(extra_context={'name': 'Jerry'}).send()\n\n\nInstallation\n------------\n\n``pip install django-mailmate``\n\n\nTemplatedEmailMessage\n---------------------\n\nExtend ``TemplatedEmailMessage``, and set class attributes. You can override\nany of those attributes by passing keyword arguments to the constructor.\n\n.. code-block:: python\n\n from mailmate import TemplatedEmailMessage\n\n class MyEmail(TemplatedEmailMessage):\n to = ['some-user@some-email.com']\n from_email = 'no-reply@some-email.com'\n subject = 'Hello!'\n template = 'emails/template.txt'\n\n MyEmail(to=['somebodyelse@somewhereelse.com']).send()\n\nYou can use a template to define your email body (like in the above example), or\ndefine it as a string:\n\n.. code-block:: python\n\n from mailmate import TemplatedEmailMessage\n\n class MyEmail(TemplatedEmailMessage):\n to = ['some-user@some-email.com']\n subject = \"The subject is parsed as a {{ what }}\"\n body = \"The body's also parsed as a {{ what }}.\"\n\n MyEmail(extra_context={'what': 'Django template!'}).send()\n\n``TemplatedEmailMessage`` also makes it simple to create HTML emails. Simply add\nan ``html_template_name`` attribute to your class (or pass it to the\nconstructor):\n\n.. code-block:: python\n\n from mailmate import TemplatedEmailMessage\n\n class MyEmail(TemplatedEmailMessage):\n to = ['some-user@some-email.com']\n subject = \"The subject is parsed as a {{ what }}\"\n body = \"The body's also parsed as a {{ what }}.\"\n html_template_name = 'emails/my_email.html'\n\nThe ``TemplatedEmailMessage`` class extends\n``django.core.mail.EmailMultiAlternatives``, so you don't have to do anything\nspecial to use it with your favorite backend.\n\nIf you install markdownify__, you can omit the plaintext version of your\nmessage; mailmate will generate one automatically from the HTML version.\nOtherwise, omitting both ``body`` and ``template_name`` will cause a MissingBody\nexception to be raised. If you want to send an email without a plaintext body,\nyou must set ``body`` to an empty string explicitly.\n\n__ https://pypi.python.org/pypi/markdownify\n\n\nCleanEmailBackend\n-----------------\n\nMailmate also includes a special backend to help you debug your emails. It's\nlike Django's ``django.core.mail.backends.filebased.EmailBackend``, but in\naddition to the \\*.log file, it will also save files containing the message body\nfor each version of the message. For example, if you send an email that has both\na plaintext and HTML version, it will save a \\*.log file (with the entire\nmessage), a \\*.txt file (with the plaintext body) and a \\*.html file (with the\nbody of the HTML alternative).\n\nTo use it, set your ``EMAIL_BACKEND`` and ``EMAIL_FILE_PATH`` settings in\nsettings.py:\n\n.. code-block:: python\n\n EMAIL_BACKEND = 'mailmate.backends.CleanEmailBackend'\n EMAIL_FILE_PATH = '/path/to/messages/'", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/hzdg/django-mailmate", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-mailmate", "package_url": "https://pypi.org/project/django-mailmate/", "platform": "", "project_url": "https://pypi.org/project/django-mailmate/", "project_urls": { "Homepage": "http://github.com/hzdg/django-mailmate" }, "release_url": "https://pypi.org/project/django-mailmate/1.3.0/", "requires_dist": null, "requires_python": "", "summary": "Django email tools.", "version": "1.3.0" }, "last_serial": 4098075, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "b926850b3832e098a2b8890072c95f3d", "sha256": "16ee20cec986245978ba30de4c84b3b4497b70ec2d56b5664f64dc19d83d00ad" }, "downloads": -1, "filename": "django-mailmate-1.0.0.tar.gz", "has_sig": false, "md5_digest": "b926850b3832e098a2b8890072c95f3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4716, "upload_time": "2013-07-31T18:34:35", "url": "https://files.pythonhosted.org/packages/52/d0/438fc2620d473968c8681d66a3c9b20e4ce7bd26bc40ef588c09ff7339ba/django-mailmate-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "653831e0e59f34177b5cee6d2b041346", "sha256": "481760fd9bb9ee6e5ef6a61acc17a5c2979a7a6538b9895cd7f0033d113681ca" }, "downloads": -1, "filename": "django-mailmate-1.0.1.tar.gz", "has_sig": false, "md5_digest": "653831e0e59f34177b5cee6d2b041346", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 105281, "upload_time": "2013-08-01T20:27:55", "url": "https://files.pythonhosted.org/packages/de/75/46a2397c1a93952c07c2e919a811189a90ccc8c5dc5c51b04c7b15826c6c/django-mailmate-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "17a4c6e1cfad592a9f3666ebefebabee", "sha256": "f7679b4fb138c3fb6d1574fb6d2d3413194b7681d632a6fa047cae24d7e2fcbe" }, "downloads": -1, "filename": "django-mailmate-1.1.0.tar.gz", "has_sig": false, "md5_digest": "17a4c6e1cfad592a9f3666ebefebabee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19761, "upload_time": "2013-08-01T21:46:17", "url": "https://files.pythonhosted.org/packages/d8/22/f21e719b32d1a431c1bc130b8c0874b29e765aed7eb0753a40638403e3b5/django-mailmate-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "5b79d9e223aa6c5d30f713c371768a78", "sha256": "296515091921573a1029232b5d87012f1a92ccc1cc6b2468b58ed57f83ac6a48" }, "downloads": -1, "filename": "django-mailmate-1.1.1.tar.gz", "has_sig": false, "md5_digest": "5b79d9e223aa6c5d30f713c371768a78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19805, "upload_time": "2017-08-17T18:09:50", "url": "https://files.pythonhosted.org/packages/be/33/43c755d0fc7b2c975bc1fb1d0120102165d78272b66fd6e2ed3c7cc51d10/django-mailmate-1.1.1.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "3c7d914e73064c85fcf4ef98e83eb08a", "sha256": "65cc93c9b007dbe3e97414f761b901615ef708fa094ae454974780012dbd5605" }, "downloads": -1, "filename": "django-mailmate-1.2.0.tar.gz", "has_sig": false, "md5_digest": "3c7d914e73064c85fcf4ef98e83eb08a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19880, "upload_time": "2017-12-12T19:41:48", "url": "https://files.pythonhosted.org/packages/ca/35/d31027c0e04b58f800422110fbc23ff28c4aaddfe5b807305b7bf30e4a78/django-mailmate-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "637fc8dbee7f56ae4a7c3b09359114e5", "sha256": "efd90549c6fc094ed00a3f75383571f8ad1c01c6c19c34809cf4194aa18aa2f3" }, "downloads": -1, "filename": "django-mailmate-1.3.0.tar.gz", "has_sig": false, "md5_digest": "637fc8dbee7f56ae4a7c3b09359114e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19963, "upload_time": "2018-07-24T18:40:59", "url": "https://files.pythonhosted.org/packages/89/e6/4dfe014afd44a4aa2da553ad3219396b4d53da431a88d277ddf2d5f51bbe/django-mailmate-1.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "637fc8dbee7f56ae4a7c3b09359114e5", "sha256": "efd90549c6fc094ed00a3f75383571f8ad1c01c6c19c34809cf4194aa18aa2f3" }, "downloads": -1, "filename": "django-mailmate-1.3.0.tar.gz", "has_sig": false, "md5_digest": "637fc8dbee7f56ae4a7c3b09359114e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19963, "upload_time": "2018-07-24T18:40:59", "url": "https://files.pythonhosted.org/packages/89/e6/4dfe014afd44a4aa2da553ad3219396b4d53da431a88d277ddf2d5f51bbe/django-mailmate-1.3.0.tar.gz" } ] }