Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools
Board » General » Feature Discussions » Notification email sender and subject

Hello,

we noticed that the notification emails appear as sent from "webmaster@localhost". The reason is that the datatuple in send_mass_mail has the sender set to None (sphboard/models.py, line 913).

We patched it to use the SERVER_EMAIL setting instead. We are also appending the prefix set in the EMAIL_SUBJECT_PREFIX setting to the message title.

The patch is trivial but available in http://trac.python.it/sito/changeset/74 anyway.

I also noticed that the email subject is not internationalized: we have not been working to the Italian localization yet, but as soon as we prepare the localization we will also send any relevant patch, together with the .po of course.

Regards.
Daniele Varrazzo
Develer s.r.l. -- http://www.develer.com
hi,
as far as i know if omitted django should use settings.DEFAULT_FROM_EMAIL - is this not the case? good idea with the prefix - but maybe it would make sense to let the whole string be configurable, what do you think?

thanks
Hey, we have Signatures !!! Great, isn't it ? ;)
as far as i know if omitted django should use settings.DEFAULT_FROM_EMAIL - is this not the case?
Uhm, yes: it is actually the case. I missed the DEFAULT_FROM_EMAIL documentation and assumed SERVER_EMAIL was the properly configurable one. Looking the documentation for both settings it seems the DEFAULT_FROM_EMAIL is more appropriate.

I was also mislead by the fact that you pass a None in the "datatuple" where the documentation for "send_email" says it expects a string, so I thought "webmaster@localhost" was a form of "last resort fallback", not a configurable setting. In my case an explicit "DEFAULT_FROM_EMAIL" in the datatuple building would have been a more explicit "go read the Django docs" instead of a "toh, I found a bug" message ;)

good idea with the prefix - but maybe it would make sense to let the whole string be configurable, what do you think?


If it were internationalised, it could be a good default. Because it contains placeholders, it is a little bit tricky to be configured anyway. If it were a configuration setting, its default should be localised, and in this case I would -personally- probably keep the default. At this point you may also want to configure the body... I would personally leave both title and body in the code and leave people who really want to change them to hack the code :)

By the way, as soon as I started testing the board, I received three "bug reports". All of them, upon investigation, revealed being just parameters to be tweaked and not bugs in the code. So I should say congratulations: even the sphene trunk, set up by a newcomer, seems production ready :) The only problem was probably a strange choice for some parameter defaults (6 hours to update the post count?) and a not very visible (but actually available) documentation.
Daniele Varrazzo
Develer s.r.l. -- http://www.develer.com

Please login to post a reply.



Powered by Sphene Community Tools