- changed status to open
[Question] Customisation of notification recipients
I am looking for a way to filter or customise the email addresses of users when they are notified about messages. The reason is that in our database, some users have their email addresses marked as non-functional (in the auth_user
table). I would like to deliver the message to such a user via postman in any case, but to refrain from sending an email notification to the marked email address (which is invalid).
Seems like I need to subclass the Message
class, overriding the notify_users
method, and then each of the forms WriteForm
, AnonymousWriteForm
, QuickReplyForm
, and FullReplyForm
, and furthermore the corresponding views making use of these forms.
Is there a better way?
If not, would it be possible to add support for a filter/customisation feedback function, for the email notification only? (without interference with the existing filters.) This function would be called for each recipient and determine whether and to what email address a notification should be sent.
Comments (7)
-
repo owner -
repo owner Could you have a look at the forecasted documentation of the POSTMAN_NOTIFICATION_APPROVAL setting at https://bitbucket.org/psam/django-postman/wiki/quickstart and tell if it’s OK for you?
-
reporter I read though the docs and the new setting sounds great! It even takes care of cases I didn't think of. Looking forward to the new release!
(Could you explain in a bit more detail in the docs, what the two additional parameters “action” and “site” will contain?)
-
repo owner The implementation is now committed in repository.
Could you have a try before a public release?
-
reporter @Patrick Samson I tested our use case (described in the original message) and POSTMAN_NOTIFICATION_APPROVAL works like a charm.
-
reporter Any idea when a new version could be available?
-
repo owner - changed status to resolved
Published in the 3.7 release.
- Log in to comment
Please give more details about your context: