The v1.2 votes are in, and it appears that Email-01 (introducing an
email backend API) needs some more discussion.
I am in complete agreement that Django shouldn't try to become an
email framework. That isn't the intention of this proposal.
The intention is to fix a specific problem that exists for supporting
sandboxed deployment environments, and AppEngine in particular.
AppEngine doesn't provide an SMTP server - the AppEngine sandbox
provides a specific API for sending email, rather than the standard
Python mail API. This is a problem because because Django provides an
API for sending email - and uses that API internally:
* contrib.auth sends mail as part of the password reset process
* contrib.comments sends mail as part of the comment moderation process
* the 500 handler sends mail to site admins
* the CommonMiddleware sends mail on broken links to site managers
If we're going to fully support AppEngine (and any other sandboxed
deployment platform), we need to provide a way to direct Django's
email APIs to APIs provided by a sandbox.
As a side effect, providing email an backend API cleans up a few other
minor lingering issues:
- It cleans up the monkeypatching required by the test framework,
since emails can be easily redirected to an in-memory backend during
test execution.
- It provides an easy way to debug email sending on the development
server. An 'email test server' was proposed - and ultimately rejected
- for v1.1. A 'console' email backend resolves this problem by
providing a way to direct email to stdout, rather than SMTP.
- It provides an elegant entry point for tools like django-mailer.
The email backend API would allow django-mailer to become a specialist
external email backend. This allows for greater decoupling: apps can
just call the Django mail api, rather than needing to specifically
provide django-mailer support.
I felt an email backend API would be an elegant way to gain a lot of
flexibility, with essentially no impact for existing users. The
original django-dev discussion [1] didn't raise much dissent - but the
voting process has shown that there is obviously some disagreement.
I'm keen to see a resolution to this problem. To that end, I'm
interested in hearing specific criticisms or concerns with the current
backend proposal. I'm also interested in any alternate approaches to
this problem.
[1] http://groups.google.com/group/django-developers/browse_thread/thread/ad0e5b2a8fd1ffe4
Yours,
Russ Magee %-)
> I'm keen to see a resolution to this problem. To that end, I'm
> interested in hearing specific criticisms or concerns with the
> current backend proposal. I'm also interested in any alternate
> approaches to this problem.
I'm completely fine on this proposal. Apparently I voted '-0', I'm
not sure precisely why as I didn't leave any specific comment, but I
would change that to +0 now (I have no specific need for it myself,
but can see that it's an important improvement for lots of people, and
it can be implemented cleanly).
I presume that the only built-in email backends would be the existing
SMTP one, one for testing (which is just a code shuffle really), and a
'write to standard out' one for debugging (which is trivial and
completely un-critical anyway), so this doesn't really add any
maintenance burden to Django.
Regards,
Luke
--
A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools. -- Douglas Adams
Luke Plant || http://lukeplant.me.uk/
My original reaction was based on the experience with django-mailer
which I believe could also have been used as a Petri dish for
developing pluggable email backends. I also talked to Andi about that
during Froscon and agreed about the general need for a more extensible
email system.
Regarding the voting, I'm more -0 now in the light of the other
advantages a tighter intergration with Django would bring.
Jannis
> I'm still keen to see a resolution to this problem. Can anyone -
> especially those that voted -0 or -1 - offer any feedback?
I've reviewed the RC patch on #10355. Overall, I am okay with it. I
hadn't kept up with with many of the details of the original proposal
and was afraid of over-complication. Thanks for putting in the work to
get this ready for commit, Russell.
Brian Rosner
http://oebfare.com
http://twitter.com/brosner