'Send email notifications.
Reads settings from settings.EMAIL_NOTIFICATIONS dict, if available,
using ``notification_id`` as a key or else provides reasonable
defaults.'

def send_email_notification(self, notification_id=None, include_traceback=False, verbosity=1):

    if (notification_id is not None):
        try:
            email_settings = settings.EMAIL_NOTIFICATIONS.get(notification_id, {})
        except AttributeError:
            email_settings = {}
    else:
        email_settings = {}
    if ((not include_traceback) and (not email_settings.get('notification_level', 0))):
        print self.style.ERROR("Exiting,    not    in    'notify    always'    mode.")
        return
    subject = email_settings.get('subject', 'Django    extensions    email    notification.')
    body = email_settings.get('body', ("Reporting    execution    of    command:    '%s'" % self.argv_string))
    if (include_traceback and (not email_settings.get('no_traceback', False))):
        try:
            (exc_type, exc_value, exc_traceback) = sys.exc_info()
            trb = ''.join(traceback.format_tb(exc_traceback))
            body += ('\n\nTraceback:\n\n%s\n' % trb)
        finally:
            del exc_traceback
    from_email = email_settings.get('from_email', settings.DEFAULT_FROM_EMAIL)
    recipients = list(email_settings.get('recipients', []))
    if (not email_settings.get('no_admins', False)):
        recipients.extend([a[1] for a in settings.ADMINS])
    if (not recipients):
        if (verbosity > 0):
            print self.style.ERROR('No    email    recipients    available.')
        return
    send_mail(subject, body, from_email, recipients, fail_silently=email_settings.get('fail_silently', True))
