=============
Django-Ogmios
=============
.. image:: https://travis-ci.org/fusionbox/django-ogmios.svg?branch=master
:target: https://travis-ci.org/fusionbox/django-ogmios
:alt: Build Status
Just sends emails. Simple, easy, multiformat.
For those wondering, `Ogmios <https://en.wikipedia.org/wiki/Ogmios>`_ is just the Gallic god of eloquence.
Quickstart
==========
Install from PyPI with ``pip``: ``pip install django-ogmios``.
``yourproject/templates/mail/template.html``::
from: admin@example.org
to: Jane Doe <jane.doe@example.net>, {% for u in users %}{{ user.email }}, {% endfor %}
cc: John Doe <john.doe@example.org>, {{ copy_user.get_full_name }} <{{ copy_user.email }}>
bcc: anonymous@example.org, secret@example.com
subject: The whole email is a template
content-type: markdown
headers:
Reply-To: Jaqueline <jaqueline@example.net>
Organization: Example.org, Inc.
---
{% load special_filter %}
This is a list of special items:
{% for item in item_list %}
* {{ item|special }}
{% endfor %}
.. code:: python
import ogmios
ogmios.send_email('mail/template.html',
{'item_list': ['Hello']},
attachments=[{
'path': '/path/to/file/',
'name': 'file.txt',
'type': 'text/plain',
}])
This will render the content as markdown, and send the email with an HTML part and a Plaintext part.
For attachments, it is possible to just specify the path, or the path, filename and mimetype.
Tips
====
Resend an email with different context:
.. code:: python
import functools
import ogmios
from myapp.models import User
send_registration = functools.partial(ogmios.send, 'mail/template.html')
send_registration({'user': User.objects.get(pk=1337)})
Changelog
=========
0.12.0 (2025-01-29)
-------------------
- Use old non-strict behavior of getaddresses. Requires latest patch version of Python >= 3.8
0.11.2 (2020-07-02)
-------------------
- Make bcc work
0.11.1 (2018-10-12)
-------------------
- Fix email parsing [#15]
0.11.0 (2018-09-04)
-------------------
- Add support for Django > 1.11 and remove support for all prior versions.
0.10.0 (2016-04-13)
-------------------
- Add support for Django 1.9
- Drop support for Django 1.7
- Move method of adding attachments out of the template
and require attachments to be passed as an argument to ``send_email()``.
0.9.3 (2015-08-27)
------------------
- Add Django 1.7 compatibility.
0.9.2 (2015-07-16)
------------------
- Fix ``setup.py`` dependencies.
- Fix tests.
- Fix compatibility with django's cached loader.
- Fix context processing.
0.9.1 (2015-06-22)
------------------
- Fix 'From' field always being default
0.9.0 (2015-06-18)
------------------
- Initial version
Raw data
{
"_id": null,
"home_page": "https://github.com/fusionbox/django-ogmios",
"name": "django-ogmios",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "email send easy simple helpers django",
"author": "Fusionbox, Inc.",
"author_email": "programmers@fusionbox.com",
"download_url": "https://files.pythonhosted.org/packages/57/ce/712652bc17ac0567fce6070e2ffcb9d7eb9db6632eeae961f99f34d95950/django_ogmios-0.12.0.tar.gz",
"platform": null,
"description": "=============\nDjango-Ogmios\n=============\n.. image:: https://travis-ci.org/fusionbox/django-ogmios.svg?branch=master\n :target: https://travis-ci.org/fusionbox/django-ogmios\n :alt: Build Status\n\nJust sends emails. Simple, easy, multiformat.\n\nFor those wondering, `Ogmios <https://en.wikipedia.org/wiki/Ogmios>`_ is just the Gallic god of eloquence.\n\nQuickstart\n==========\n\nInstall from PyPI with ``pip``: ``pip install django-ogmios``.\n\n``yourproject/templates/mail/template.html``::\n\n from: admin@example.org\n to: Jane Doe <jane.doe@example.net>, {% for u in users %}{{ user.email }}, {% endfor %}\n cc: John Doe <john.doe@example.org>, {{ copy_user.get_full_name }} <{{ copy_user.email }}>\n bcc: anonymous@example.org, secret@example.com\n subject: The whole email is a template\n content-type: markdown\n headers:\n Reply-To: Jaqueline <jaqueline@example.net>\n Organization: Example.org, Inc.\n ---\n {% load special_filter %}\n\n This is a list of special items:\n\n {% for item in item_list %}\n * {{ item|special }}\n {% endfor %}\n\n\n.. code:: python\n\n import ogmios\n\n ogmios.send_email('mail/template.html',\n {'item_list': ['Hello']},\n attachments=[{\n 'path': '/path/to/file/',\n 'name': 'file.txt',\n 'type': 'text/plain',\n }])\n\n\nThis will render the content as markdown, and send the email with an HTML part and a Plaintext part.\nFor attachments, it is possible to just specify the path, or the path, filename and mimetype.\n\nTips\n====\n\nResend an email with different context:\n\n.. code:: python\n\n import functools\n import ogmios\n\n from myapp.models import User\n\n send_registration = functools.partial(ogmios.send, 'mail/template.html')\n send_registration({'user': User.objects.get(pk=1337)})\n\n\nChangelog\n=========\n\n0.12.0 (2025-01-29)\n-------------------\n\n- Use old non-strict behavior of getaddresses. Requires latest patch version of Python >= 3.8\n\n0.11.2 (2020-07-02)\n-------------------\n\n- Make bcc work\n\n\n0.11.1 (2018-10-12)\n-------------------\n\n- Fix email parsing [#15]\n\n\n0.11.0 (2018-09-04)\n-------------------\n\n- Add support for Django > 1.11 and remove support for all prior versions.\n\n\n0.10.0 (2016-04-13)\n-------------------\n\n- Add support for Django 1.9\n- Drop support for Django 1.7\n- Move method of adding attachments out of the template\n and require attachments to be passed as an argument to ``send_email()``.\n\n\n0.9.3 (2015-08-27)\n------------------\n\n- Add Django 1.7 compatibility.\n\n\n0.9.2 (2015-07-16)\n------------------\n\n- Fix ``setup.py`` dependencies.\n- Fix tests.\n- Fix compatibility with django's cached loader.\n- Fix context processing.\n\n\n0.9.1 (2015-06-22)\n------------------\n\n- Fix 'From' field always being default\n\n\n0.9.0 (2015-06-18)\n------------------\n\n- Initial version\n",
"bugtrack_url": null,
"license": null,
"summary": "Just sends email. Simple, easy, multiformat.",
"version": "0.12.0",
"project_urls": {
"Homepage": "https://github.com/fusionbox/django-ogmios"
},
"split_keywords": [
"email",
"send",
"easy",
"simple",
"helpers",
"django"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2c2fb0ff205fa8b6123d9299a0c07b556fb52f13213f5c0810685665c7fe41c1",
"md5": "bf75096a5f79ad60904a96b78af8ae65",
"sha256": "70cd540c314ecfb9d126eb1afadcbf27b0cf0f1703ffa1be88aa13b900a992ce"
},
"downloads": -1,
"filename": "django_ogmios-0.12.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bf75096a5f79ad60904a96b78af8ae65",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5914,
"upload_time": "2025-01-29T19:25:49",
"upload_time_iso_8601": "2025-01-29T19:25:49.077750Z",
"url": "https://files.pythonhosted.org/packages/2c/2f/b0ff205fa8b6123d9299a0c07b556fb52f13213f5c0810685665c7fe41c1/django_ogmios-0.12.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "57ce712652bc17ac0567fce6070e2ffcb9d7eb9db6632eeae961f99f34d95950",
"md5": "d0fcbfbca2c67f0d8975ac4d542ca2d8",
"sha256": "02c0dc4a78d62ed6146486e6aafe158d88666d9420a1b71894ef4570f820715d"
},
"downloads": -1,
"filename": "django_ogmios-0.12.0.tar.gz",
"has_sig": false,
"md5_digest": "d0fcbfbca2c67f0d8975ac4d542ca2d8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5925,
"upload_time": "2025-01-29T19:25:50",
"upload_time_iso_8601": "2025-01-29T19:25:50.914509Z",
"url": "https://files.pythonhosted.org/packages/57/ce/712652bc17ac0567fce6070e2ffcb9d7eb9db6632eeae961f99f34d95950/django_ogmios-0.12.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-29 19:25:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "fusionbox",
"github_project": "django-ogmios",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "django-ogmios"
}