GithubHelp home page GithubHelp logo

mdaizovi / django_switchboard_operator Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 55 KB

A simple django app for receiving, forwarding, and sending domain email, using django-anymail and an ESP

License: Other

Python 96.32% HTML 3.68%

django_switchboard_operator's Introduction

Django Switchboard Operator

Django Switchboard Operator is a simple Django app to receive, direct, send, and forward domain emails. It uses django-anymail to integrate with a selected Email Service Provider (ESP) such as SendGrid or Mailchimp. You can then:

  • receive emails
  • auto-forward emails to designated email addresses
  • send emails from your authenticated domain, using the django admin.

In other words, it's a way to send and receive very basic domain mail without paying for a G Suite or Zoho account. Please note, this app will allow you to send small attachments, and will forward them as well, but it will ignore inline attachments. This package assumes you already have MEDIA_ROOT specified in your settings.

This package requires and assumes you have already installed django-anymail, and already have an account with a supported ESP. It also requires django-cleanup, to delete files after attachments have been sent/forwarded.

This is my first pluggable django app that I made because I was tired of writing the same code in 3 of my own apps, but I make no promises re: your usage. In other words: Caveat Emptor. I have successfully used it with my django-anymail and my SendGrid account, with my 3 django apps running django 1.11.6, 2.0, and 2.0.1.

Quick start

  1. Install django-cleanup, django-anymail, and get an account with a supported ESP, if you haven't already.

  2. Clone or fork this repo

  3. Edit your project's settings.py:

    INSTALLED_APPS = [
        # ...
        "switchboard_operator"
        # ...
    ]
    
    # If you want to automatically forward emails to another address
    # *@domain.com will forward all for domain,
    # a specific address will forward only emails to that address, for the domain.
    MAIL_FORWARD_MAP = {"*@example.com":"[email protected]",
        "[email protected]":"[email protected]",
    }
    # Your authenticated email domains to send mail from
    SENDER_ADDRESSES =["[email protected]", "[email protected]"]
  4. Run python manage.py migrate to create the switchboard_operator models.

Troubleshooting

  1. If the django admin does not have the "Send" button for MessageOutgoing object, ensure you have set APP_DIRS to True:

    TEMPLATES = [
    {

    # ...

    'APP_DIRS': True,

    },

    ]

django_switchboard_operator's People

Contributors

mdaizovi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.