ckanext-mailcraft
The ckanext-mailcraft extension provides next features:
- A custom mailer that can be conveniently expanded as needed
- Prestyled email template
- A dashboard where you can view a list of all sent e-mails
- A function of stopping the sending of all emails sent through our mailer in order to debug the functionality.
To enable the extension, add mailcraft to the ckan.plugins setting in your CKAN.
If you want to enable the dashboard you should also add mailcraft_dashboard to the ckan.plugins setting.
Usage
To use a mailer, you just have to import it.
from ckanext.mailcraft.utils import get_mailer
mailer = get_mailer()
mailer.mail_recipients(
subject="Hello world",
recipients=["test@gmail.com"],
body="Hello world",
body_html=tk.render(
"mailcraft/emails/test.html",
extra_vars={"site_url": mailer.site_url, "site_title": mailer.site_title},
),
)
Dashboard
The mailcraft dashboard requires the ckanext-admin-panel extension to be enabled. Otherwise, there most likely will be
an exception, cause we're heavily relying on the admin panel and some extra requirements of it.
Requirements
Compatibility with core CKAN versions:
| CKAN version | Compatible? |
|---|
| 2.9 and earlier | no | | 2.10+ | yes |
Installation
Use PyPI to install the extension with pip. Or check the Developer installation section.
Config settings
There's a separate page in admin panel to configure mailcraft settings. Check the config_declaration.yaml file.
Developer installation
To install ckanext-mailcraft for development, activate your CKAN virtualenv and do:
git clone https://github.com/DataShades/ckanext-mailcraft.git
cd ckanext-mailcraft
python setup.py develop
pip install -r dev-requirements.txt
Tests
To run the tests, do: pytest --ckan-ini=test.ini
License
Metadata
Release files for ckanext-mailcraft 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ckanext_mailcraft-0.4.0.tar.gz | 55.9 kB | Without provenance | Details for ckanext_mailcraft-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ckanext_mailcraft-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for ckanext_mailcraft-0.4.0-py3-none-any.whl |
Total release size: 103.5 kB
Release files / ckanext_mailcraft-0.4.0.tar.gz
| Download URL | ckanext_mailcraft-0.4.0.tar.gz |
|---|---|
| Size | 55.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
613294a9c914e2956a0a2db34fce89fad0fd85850c6dfbf4149b331e1110da79
|
|
BLAKE2b-256 checksum How to use checksums |
8cc7ec3c92bf4b94002388c01317409a7f8d42875a943d8be6cba51496b8857c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / ckanext_mailcraft-0.4.0-py3-none-any.whl
| Download URL | ckanext_mailcraft-0.4.0-py3-none-any.whl |
|---|---|
| Size | 47.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5b8a5424a3062bbe481663210f989f6904b2cc9a0cf5cb2809863ce8bcc439c
|
|
BLAKE2b-256 checksum How to use checksums |
bb85658b543c42d3962dab2f774f515bc9c3f35ab1a384f797a4efad0f01faac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Security for ckanext-mailcraft 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.