Skip to content

neamaddin/djmailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Mailersend (Djmailer)

tests codecov python-versions PyPI GitHub

Djmailer

Content

Requirements

Python 3.8+
The package has 2 required dependencies:

Installation

This project uses celery to send emails, so you need to set up celery for your project first.

If you have already configured celery and a broker for it, it will be enough to run the following command to install:

pip install djmailer

If you are going to install and configure celery to use redis run the following command:

pip install djmailer[redis]

Then add 'djmailer' to your INSTALLED_APPS.

INSTALLED_APPS = [
    ...
    'djmailer',
]

Django project settings.py file might include following constants:

# djmailer settings

EMAIL_BACKEND = 'djmailer.backend.EmailBackend'
DJMAILER_FROM_EMAIL = 'verified@mail.com'
DJMAILER_FROM_NAME = 'Verified Name'
MAILERSEND_API_KEY = 'YOUR_MAILERSEND_API_KEY'

In order for celery to be able to detect tasks in django-mailsend, you need to add package to the task detection function in the configuration file (usually celery.py).

...
app.autodiscover_tasks(packages=['djmailer', ])

Also in the repository on GitHub there is an example of a Django project on which everything is already configured.

Testing

To run tests in your project environment just run following command:

python manage.py test djmailer

Tox is used to test this package.

For run tests with python 3.8, 3.9, 3.10 and 3.11 must be installed

You can use pyenv for dynamic managing python versions

To run tests, install and run tox with the following commands:

# install tox
pip install tox
# run tox
tox

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages