reviewboard.notifications.email.hooks¶
Extension hooks for augmenting e-mail messages.
- register_email_hook(signal, handler)[source]¶
Register an e-mail hook.
- Parameters
signal (django.dispatch.Signal) – The signal that will trigger the e-mail to be sent. This is one of
review_request_published
,review_request_closed
,review_published
, orreply_published
.handler (reviewboard.extensions.hooks.EmailHook) – The
EmailHook
that will be triggered when an e-mail of the chosen type is about to be sent.
- unregister_email_hook(signal, handler)[source]¶
Unregister an e-mail hook.
- Parameters
signal (django.dispatch.Signal) – The signal that will trigger the e-mail to be sent. This is one of
review_request_published
,review_request_closed
,review_published
, orreply_published
.handler (reviewboard.extensions.hooks.EmailHook) – The
EmailHook
that will be triggered when an e-mail of the chosen type is about to be sent.
- filter_email_recipients_from_hooks(to_field, cc_field, signal, **kwargs)[source]¶
Filter the e-mail recipients through configured e-mail hooks.
- Parameters
to_field (set) – The original To field of the e-mail, as a set of
Users
andGroups
.cc_field (set) – The original CC field of the e-mail, as a set of
Users
andGroups
.signal (django.dispatch.Signal) – The signal that triggered the e-mail.
**kwargs (dict) – Extra keyword arguments to pass to the e-mail hook.
- Returns
A 2-tuple of the To field and the CC field, as sets of
Users
andGroups
.- Return type