GithubHelp home page GithubHelp logo

Comments (5)

selwin avatar selwin commented on June 18, 2024

We can add an option called "DEFAULT_PRIORITY". User can then set this to "now" to mimic Django's synchronous send mail behavior.

from django-post_office.

evgenyfadeev avatar evgenyfadeev commented on June 18, 2024

Thanks. I've tried and the regular send_mail works, only it does not send the mail instantly so we have to run a cron job.

The DEFAULT_PRIORITY setting will be useful.

The reason I'd like to have the send_mail work is because that would allow using post_office without changing third party apps to get started easily.

from django-post_office.

selwin avatar selwin commented on June 18, 2024

Yeah, I think that's a valid reason. I won't have time to work on this in the next few days, but it would be great if someone can take a stab at writing a patch :). The config should look like this:

POST_OFFICE = {
    'DEFAULT_PRIORITY': 'now', # Also accepts "high", "medium" or "low"
    'BATCH_SIZE': 3000,
    # Other settings...
}

from django-post_office.

sid24ss avatar sid24ss commented on June 18, 2024

The DEFAULT_PRIORITY setting does not solve all the requirements of having to use django's send_mail. The default django.contrib.auth.views use the send_mail function and this breaks if the email backend is post_office. How does one work around this?

from django-post_office.

selwin avatar selwin commented on June 18, 2024

The idea is that you can set DEFAULT_PRIORITY to "now" in settings.py and it should behave pretty much like regular send_mail.

Sent from my phone

On Feb 23, 2014, at 7:04 PM, Siddharth Swaminathan [email protected] wrote:

The DEFAULT_PRIORITY setting does not solve all the requirements of having to use django's send_mail. The default django.contrib.auth.views use the send_mail function and this breaks if the email backend is post_office. How does one work around this?


Reply to this email directly or view it on GitHub.

from django-post_office.

Related Issues (20)

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.