lambdalisue/django-inspectional-registration

Inspector notification e-mail not working

DAV3HIT3 opened this issue · 2 comments

Hi,
I'm using django-inspectional-registration and have e-mail notification working for user registration but I can't get the "inspector" e-mail notification working.

In the docs there is a short section http://django-inspectional-registration.readthedocs.org/en/latest/faq.html#how-can-i-get-notification-email-when-new-user-has-registered-in-the-site but it doesn't have much info.

I have done the following steps:

  1. Added 'registration.contrib.notification' to INSTALLED_APPS in settings.
  2. Created registration/notification_email.txt and registration/notification_email_subject.txt

Is there some other setting that I need?

Did you follow https://docs.djangoproject.com/en/dev/topics/email/ or installed django-mailer?

Additionally you can find more document (source code) at http://django-inspectional-registration.readthedocs.org/en/latest/registration.contrib.notification.html#module-registration.contrib.notification

I'm guessing that you may need to register inspectors into settings.ADMINS or whatever (see the code below used in the module).

    if settings.REGISTRATION_NOTIFICATION_ADMINS:
        for userinfo in settings.ADMINS:
            recipients.append(userinfo[1])
    if settings.REGISTRATION_NOTIFICATION_MANAGERS:
        for userinfo in settings.MANAGERS:
            recipients.append(userinfo[1])
    if settings.REGISTRATION_NOTIFICATION_RECIPIENTS:
        method_or_iterable = settings.REGISTRATION_NOTIFICATION_RECIPIENTS
        if callable(method_or_iterable):
            recipients.extend(method_or_iterable())
        elif isinstance(method_or_iterable, (list, tuple)):
            recipients.extend(method_or_iterable)

Got it working thanks!
I needed settings.ADMINS