# Path: kibitzr/conf.py
# def settings():
#     """
#     Returns singleton instance of settings
#     """
#     return ReloadableSettings.instance()
# 
# Path: kibitzr/compat.py



import logging
import functools
import six
from smtplib import SMTP
from ..conf import settings
from ..compat import SMTPNotSupportedError




logger = logging.getLogger(__name__)


def notify_factory(conf, value):
    @functools.wraps(notify)
    def baked_notify(report):
        return notify(
            conf=conf,
            report=report,
            notifier_conf=value,
        )
    return baked_notify


def notify(conf, report, notifier_conf):
    logger.info("Executing SMTP notifier")

# Path: kibitzr/conf.py
# def settings():
#     """
#     Returns singleton instance of settings
#     """
#     return ReloadableSettings.instance()
# 
# Path: kibitzr/compat.py



# Path: kibitzr/notifier/smtp.py
import logging
import functools
import six
from smtplib import SMTP
from ..conf import settings
from ..compat import SMTPNotSupportedError





logger = logging.getLogger(__name__)


def notify_factory(conf, value):
    @functools.wraps(notify)
    def baked_notify(report):
        return notify(
            conf=conf,
            report=report,
            notifier_conf=value,
        )
    return baked_notify


def notify(conf, report, notifier_conf):
    logger.info("Executing SMTP notifier")

    credentials = settings().creds.get('smtp', {})