Extra features for django-mail-factory.
New features:
SMS factory to handle SMS like mails, Twilio integration implemented.
Async email class to send email via celery.
SMS Factory:
Defining SMS templates:
Define your templates inside a folder templates/sms/<template_name>/body.html.
Registering a SMS message using Twilio backend (Twilio python client needed):
from mailfactory_extras import smsfactory from mailfactory_extras.sms.twilio.sms import TwilioSMS class InvitationSMS(TwilioSMS): template_name = "invitation" params = ['user'] smsfactory.register(InvitationSMS)template_name defines the name of the template to use.
params is the dict with the context variables the template will receive.
Sending SMS, just call send() from the smsfactory:
from mailfactory_extras import smsfactory smsfactory.send('invitation', {'user': 'Foo'})
Async email class:
Define your email class using CeleryMail.
from mail_factory import factory
from mailfactory_extras.backends.celery import CeleryMail
class InvitationAsyncEmail(CeleryMail):
template_name = "invitation"
params = ['user']
factory.register(InvitationAsyncEmail)
Metadata
Release files for django-mailfactory-extras 0.25
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 |
|---|---|---|---|---|
| django-mailfactory-extras-0.25.tar.gz | 15.4 kB | Without provenance | Details for django-mailfactory-extras-0.25.tar.gz |
Release files / django-mailfactory-extras-0.25.tar.gz
| Download URL | django-mailfactory-extras-0.25.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
070d79ab5c964a5ee67c564454f3b299e6bb603021644fdfd401bf3f1028b1a2
|
|
BLAKE2b-256 checksum How to use checksums |
aa83f3e21f0dbbed6c49780d23495278eb8c5a6bc17624ce4b01650f3a68cdfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-mailfactory-extras 0.25
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.