Git Product home page Git Product logo

django-mcfeely's Introduction

Build Status Coverage Status

Django Version 1.4 Django Version 1.7 Django Version 1.8 Django Version 1.8

django-mcfeely

Requires Django 1.4 and higher (officially supported 1.4 / 1.7 / 1.8 / 1.9)

Django mail queue backend. Allows for putting email in specific queues to be sent out in batches (via a management command), editing emails from the admin and more.

Configuration

Add mcfeely to your INSTALLED_APPS settings:

INSTALLED_APPS = ( 'mcfeely', )

django-mcfeely supplies its own email backend that you must add to your settings.py file. This stores all the information needed to create an email at sendtime in the database.

EMAIL_BACKEND = 'mcfeely.backend.DbBackend'

Usage with django's buit in send_mail.

For basic queueing with only a default queue (usefull if you just want to delay sending of emails) there is no other configuration required. django-mcfeely will work out of the box with djangos built in send_mail function.

from django.core.mail import send_mail

send_mail('Subject here', 'Here is the message.', '[email protected]',
    ['[email protected]'], fail_silently=False)

This will only place mail in the "Default" queue. If you want to place email into defined queues you have to use mcfeely's custom send_mail function

Usage with mcfeely's send_mail

django-mcfeely provides its own send_mail function that can be used to place emails into custom queues.

from mcfeely.models import Queue
from mcfeely.mail import send_mail

mail_queue =  Queue.objects.get(queue='sample_queue')
send_mail('Subject here', 'Here is the message.', '[email protected]',
     ['[email protected]'], queue=mail_queue, fail_silently=False)

Or you can pass it the name of a queue instead.

from mcfeely.mail import send_mail

send_mail('Subject here', 'Here is the message.', '[email protected]',
     ['[email protected]'], queue='sample_queue', fail_silently=False)

Sending Queued Mail

Queued Mail is sent via a management command

python manage.py send_queue <queue_name>

django-mcfeely's People

Contributors

khabi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

awayme leotop

django-mcfeely's Issues

Unsubscribe from specific mailings

I can see a need for turning off certain mailings within my site. For example. A user may want to turn off notifications of user activity (e.g.; new member, new message...) but would still want to keep system notifications (e.g.; password expiration, account deactivation...) Maybe they just don't want the newsletter. Having self-serve toggles along with admin settings would be nice. I'm just not sure if these settings should be done in this app or if it should be it's own user settings. Thanks for the awesome app!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.