Name | dmdm JSON |
Version |
3.0.0
JSON |
| download |
home_page | None |
Summary | Django MarkDown Mails |
upload_time | 2025-08-19 13:36:31 |
maintainer | None |
docs_url | None |
author | Guilhem Saurel |
requires_python | >=3.10 |
license | None |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Django MarkDown Mail
[](https://pypi.org/project/dmdm)
[](https://github.com/nim65s/dmdm/actions/workflows/test.yml)
[](https://results.pre-commit.ci/latest/github/nim65s/dmdm/main)
[](https://codecov.io/gh/nim65s/dmdm)
[](https://codeclimate.com/github/nim65s/dmdm/maintainability)
[](https://github.com/psf/black)
Write your email in markdown, and send them in txt & html.
## Requirements
- Python 3.10+
- Django 2.0+
- [nmdmail](https://github.com/nim65s/nmdmail)
## Install
`python -m pip install dmdm`
## Usage
This replaces django's `django.core.email.send_mail`, but the mail will have an html alternative rendered from the text
part with markdown. You can also provide a custom `css` and even images (that will be inlined) located in `image_root`.
```python
from dmdm import send_mail
def send_mail(
subject: str,
message: str,
from_email: str,
recipient_list: List[str],
context: Optional[Dict] = None,
request: Optional[HttpRequest] = None,
fail_silently: bool = False,
css: Optional[str] = None,
image_root: str = ".",
auth_user: Optional[str] = None,
auth_password: Optional[str] = None,
connection: Optional[BaseEmailBackend] = None,
reply_to: Optional[List[str]] = None,
) -> int
```
If you want to write your markdown in a template, just put the name of the template in `message` and add a `context`
(which can be `{}`) and eventually a `request`:
```python
send_mail(
subject,
"test_email_template.md",
from_email,
recipient_list,
{"template_variable": "value"},
)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "dmdm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Guilhem Saurel",
"author_email": "Guilhem Saurel <guilhem.saurel@laas.fr>",
"download_url": "https://files.pythonhosted.org/packages/72/38/639b659a3491101e9df055fe8bef4271db95f5598be8b2686b22eefc0b7a/dmdm-3.0.0.tar.gz",
"platform": null,
"description": "# Django MarkDown Mail\n\n[](https://pypi.org/project/dmdm)\n[](https://github.com/nim65s/dmdm/actions/workflows/test.yml)\n[](https://results.pre-commit.ci/latest/github/nim65s/dmdm/main)\n[](https://codecov.io/gh/nim65s/dmdm)\n[](https://codeclimate.com/github/nim65s/dmdm/maintainability)\n[](https://github.com/psf/black)\n\nWrite your email in markdown, and send them in txt & html.\n\n## Requirements\n\n- Python 3.10+\n- Django 2.0+\n- [nmdmail](https://github.com/nim65s/nmdmail)\n\n## Install\n\n`python -m pip install dmdm`\n\n## Usage\n\nThis replaces django's `django.core.email.send_mail`, but the mail will have an html alternative rendered from the text\npart with markdown. You can also provide a custom `css` and even images (that will be inlined) located in `image_root`.\n\n\n```python\nfrom dmdm import send_mail\n\ndef send_mail(\n subject: str,\n message: str,\n from_email: str,\n recipient_list: List[str],\n context: Optional[Dict] = None,\n request: Optional[HttpRequest] = None,\n fail_silently: bool = False,\n css: Optional[str] = None,\n image_root: str = \".\",\n auth_user: Optional[str] = None,\n auth_password: Optional[str] = None,\n connection: Optional[BaseEmailBackend] = None,\n reply_to: Optional[List[str]] = None,\n) -> int\n```\n\nIf you want to write your markdown in a template, just put the name of the template in `message` and add a `context`\n(which can be `{}`) and eventually a `request`:\n\n```python\nsend_mail(\n subject,\n \"test_email_template.md\",\n from_email,\n recipient_list,\n {\"template_variable\": \"value\"},\n)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Django MarkDown Mails",
"version": "3.0.0",
"project_urls": {
"changelog": "https://github.com/nim65s/dmdm/blob/main/CHANGELOG.md",
"homepage": "https://github.com/nim65s/dmdm",
"repository": "https://github.com/nim65s/dmdm.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "11732dd4536a2fce73bc8b05a7e8a25ae2a6c54fa1b475125bd19555971be1fd",
"md5": "96c66c065b664fabd3fe5b214c39a9a3",
"sha256": "7641d29b2bc6ca2d119f770d66382df053e9b8cc32fa0f633a90966a17302f54"
},
"downloads": -1,
"filename": "dmdm-3.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "96c66c065b664fabd3fe5b214c39a9a3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 3121,
"upload_time": "2025-08-19T13:36:30",
"upload_time_iso_8601": "2025-08-19T13:36:30.442393Z",
"url": "https://files.pythonhosted.org/packages/11/73/2dd4536a2fce73bc8b05a7e8a25ae2a6c54fa1b475125bd19555971be1fd/dmdm-3.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7238639b659a3491101e9df055fe8bef4271db95f5598be8b2686b22eefc0b7a",
"md5": "0de8a6a1ed3855ba9f99695e80fb84a9",
"sha256": "5ba784c341a9b1a803c4dcd12d777e6b5b7d9ec495f728bd8d276ae0779296c2"
},
"downloads": -1,
"filename": "dmdm-3.0.0.tar.gz",
"has_sig": false,
"md5_digest": "0de8a6a1ed3855ba9f99695e80fb84a9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 2272,
"upload_time": "2025-08-19T13:36:31",
"upload_time_iso_8601": "2025-08-19T13:36:31.705754Z",
"url": "https://files.pythonhosted.org/packages/72/38/639b659a3491101e9df055fe8bef4271db95f5598be8b2686b22eefc0b7a/dmdm-3.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-19 13:36:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nim65s",
"github_project": "dmdm",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "dmdm"
}