Comments (4)
I'm afraid I can't understand your question. EMAIL_CONNECTIONS is not a standard Django setting. Are you using an extension that uses this? If so, please let me know what this extension is, or show more of your code that is actually using this.
from django-mailer.
You're right. EMAIL_CONNECTIONS is a custom setting of my app that I use to define multiple mail config and assign to connection
param on send_mail function (https://docs.djangoproject.com/en/1.10/topics/email/#send-mail).
I've used this solution because I need to send mail from different account.
Now, my problem is that in case SMTP fail the mail is lost and your solution is perfect because store mail in DB and delivery is managed by cron job.
But I need to use different SMTP account.
Do you think it's possible ?
Thank you.
Salvo.
from django-mailer.
It depends on how you decide which connection to use.
First, work out whether it is possible to write your custom connection/send_mail logic as a custom email backend - https://docs.djangoproject.com/en/1.10/topics/email/#defining-a-custom-email-backend - this will be possible, for example, if you can tell just by examining the message (e.g. the from/to address) which SMTP details are needed. If the decision of which backend to use is made using contextual information from the calling code that isn't stored in the message itself, you will have difficulties.
If if it possible, then first write that backend and refactor your code to use it. Then simply install django-mailer and use a custom backend as described here https://github.com/pinax/django-mailer/blob/master/docs/usage.rst#usage :
EMAIL_BACKEND = "mailer.backend.DbBackend"
MAILER_EMAIL_BACKEND = "your.custom.EmailBackend"
from django-mailer.
Yes, I think to use from_address
to route mail over multiple account.
I didn't see the MAILER_EMAIL_BACKEND
setting. Can be perfect for what I need to do.
Thank you.
Salvo.
from django-mailer.
Related Issues (20)
- Fallback email sender HOT 1
- Need to find matching MessageLogs by email address HOT 2
- What is the purpose of send_loop HOT 3
- Allow setting priority without using django-mailer specific functions
- Please start with the "why?" and the benefits HOT 2
- Having problem on django-mailer on using with djoser HOT 6
- Condense logging HOT 2
- send_loop busy loops when there are deferred messages HOT 1
- TypeError sequence item 1: expected str instance, NoneType found HOT 5
- Forecast for the next deploy? HOT 7
- Fix issue with BigAutoField
- More granular control of how many emails to send. HOT 1
- use unittest.mock instead of mock HOT 2
- How to access subject line from db HOT 4
- Stop retrying/deferring after n failures HOT 1
- Hello HOT 2
- lockfile dependency is deprecated
- Webmail Smtp HOT 3
- feature request: release email(s) from admin under interface under Message actions HOT 2
- Issue running runmailer_pg HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-mailer.