Skip to main content
https://travis-ci.org/APSL/django-yubin.svg https://codecov.io/github/APSL/django-yubin/coverage.svg?branch=master https://coveralls.io/repos/APSL/django-yubin/badge.svg https://img.shields.io/pypi/v/django-yubin.svg Documentation Status

Django Yubin allows the programmer to control when he wants to send the e-mail in this application, making the web application to answer fast as it not has to wait for the mail server.

As in our projects we use always two django packages for dealing with emails: django-mailer2 (our own fork in APSL) and django-mailviews to compose the emails we decided to create this package to fit our own needs and share with the community.

As you can see it seems django-mailer2 is not accepting patches, so in order to put a new version on pypi a new name was mandatory. So django-yubin was born (yubin is postal mail in japanese). The name attribution is for @morenosan.

How it works

Yubin replaces the standard Django Email Backend with its own. Instead of sending the e-mail trough the SMTP server Yubin stores the e-mails on the database and allows you to sent them using a cron command.

Advantages

  • Your application can answer faster, as other process is going to take care of connecting with the SMTP server and sending the e-mail.

  • Yubin stores the e-mail and allows you to retrieve using the admin. Even with the attachments.

  • Yubin allows to define prioritary queues, resend e-mails

  • Yubin helps in your development. It’s a good way to work when you’re developping the application and you don’t want to flood your test users with e-mails. With Django Yubin, and without running the cron commands, you can see how your e-mails are, retrieve them and even delete them with out sending it.

On production mode you’ll just nedd to add a cron entry in your server to send the e-mails, someting like

          • (cd $PROJECT; python manage.py send_mail >> $PROJECT/cron_mail.log 2>&1)

This will send the queued e-mail every minute.

Django Yubin is a fork from django-mailer2 with some addtions from django-mailviews and additional improvements made from apsl.net that we need for our daly basis workd. It has also contributions from other people, so don’t heasitate to read the humans.txt.

django-mailer-2 by is a Chris Beaven fork from a fork of James Tauber’s django-mailer and is a reusable Django app for queuing the sending of email.

django-mailviews from Disqus, allows you to compose e-mails using templates in the same way you compose your html templates, and allows you to preview the e-mails.

If you want to run the test you’ll need a test smtpd server, you can find one in

./bin/fake-server

run it in a different console and execute runtests.py

You can read the package documentation at http://django-yubin.readthedocs.org/en/latest/

Changelog

  • 1.4.1 Detecting if messages are encoding using different encoding headers to be able to preview them (now base64, quoted-printable).

  • 1.4.0 Option added in status_mail command to return the output in json format.

  • 1.3.1 Fix unicode and encode errors: sending queued and non queued emails and in admin detail view.

  • 1.3.0 Allow to send emails inmediatly without being saved in database (priority «now-not-queued»). Add support for Python 3.7 and Django 2.1. Remove old code for Django < 1.3.

  • 1.2.0 Fix is_base64 detection. Add a «send_test_email» command to check connection parameters. New health check view. Don’t open a connection if there are no messages in queue to send. Add a “date_sent” field to detect when the mail was sent.

  • 1.1.0 Fix attachment headers in TemplateAttachmentEmailMessagView making both “attachment” and “filename” args mandatory.

  • 1.0.5 Add missing paths in MANIFEST.in.

  • 1.0.4 Fix attachment visualization in the admin. Attach pdf in create_mail command. Solved Content-Transfer-Encoding issue.

  • 1.0.3 Fixed issue decoding the message payload, added support for django 1.9, updated changelog and added support to deploy the package from travis.

  • 1.0.0 Add support for Django 2.0 and remove django 1.8.

  • 0.8.2 Fix date created column in QueuedMessages admin.

  • 0.8.1 Ensure that LOCK_WAIT_TIMEOUT is never negative to avoid a bug in lockfile in systems which use a LinkFileLock.

  • 0.8.0 Use settings.MAILER_PAUSE_SEND to skip smtp connections. Fix UTF-8 encoding in messages. Fix encoding errors in email visualization in the admin.

  • 0.7.0 Fix template context bug for Django 1.11. Add Python 3.6 to CI and drop Python 3.3 and Django 1.9.

  • 0.6.0 Support for Python 3.6.

  • 0.5.0 Limit nº of emails sent by send_mail command. Update the debug handlers options for verbosity to accept v3.

  • 0.4.0 Support Django 1.11: subject and body are no longer unscaped, you need to add {% autoescape off %} to your non HTML templates.

  • 0.3.1 Delete unused template that caused an error with django-compressor offline. testmail command now generates HTML emails.

  • 0.3.0 Support Django >= 1.8 and <=1.10, Python 2.7, 3.3, 3.4 and 3.5. Re-send mails admin action. Fix bug in status_mail command. Demo project configured to send mails with the same mail fake-server used for tests.

  • 0.2.3 Removed {% load url from future %} to support Django 1.9. Now Django < 1.5 is not supported.

  • 0.2.2 Include migrations directory in .tar.gz in PyPi.

  • 0.2.1 Updated links to CI and Code Coverage Services

  • 0.2.0 Merged sergei-maertens contribution.

  • 0.1.8 Added migrations for Django 1.9 compatibility. See http://django-yubin.readthedocs.org/en/latest/install.html#upgrading-from-previous-versions

  • 0.1.7 Support for Django 1.8.

  • 0.1.6 Bugfixes.

  • 0.1.5 Bugfixes.

  • 0.1.4 Updated README.

  • 0.1.3 Fixed Python3 compatibility, thanks Marc, Cesc & Dani.

  • 0.1.2 Fixed Templates.

  • 0.1.1 Updated documentation and unit tests.

Metadata

Release files for django-yubin 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-yubin 1.4.1
File Size Uploaded
django-yubin-1.4.1.tar.gz 50.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-yubin 1.4.1
File Interpreter ABI Platform
django_yubin-1.4.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 94.9 kB

Release files / django-yubin-1.4.1.tar.gz

Download URL django-yubin-1.4.1.tar.gz
Size 50.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ce82e0c4e42944d7a22debbce043c64c23ab798ef03e373749b7eb19e79408fd
BLAKE2b-256 checksum
How to use checksums
4aa5104454a65f77f45e00276c4bf1faff3f4a179fc53463aaf83ae4c8b92820
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.1

Release files / django_yubin-1.4.1-py2.py3-none-any.whl

Download URL django_yubin-1.4.1-py2.py3-none-any.whl
Size 44.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
07951774c1781e17a20c4648ae15bfbcab42b98fd158f75655671481123ba0d0
BLAKE2b-256 checksum
How to use checksums
1e885b60ed1eeaf84f9c7faa9685ddff397517e10fce78633b34d67e419c208d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.1

Release history Release notifications | RSS feed

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

This release

1.4.1 This release

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

1 release file

1.2.0

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.0

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page