# 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
    send_email(
        user=user,
        password=password,
        recipients=recipients,
        subject=subject,
        body=report,
        host=host,
        port=port,
    )


def send_email(user, password, recipients, subject, body, host, port):
    message = (
        u"From: {user}\r\n"
        u"To: {to}\r\n"
        u"Subject: {subject}\r\n\r\n"
        u"{body}\r\n"
        .format(
            user=user,
            to=", ".join(recipients),
            subject=subject,
            body=body,
        )
    )
    try:
        server = SMTP(host, port)  # ("smtp.gmail.com", 587)
        server.ehlo()
        try:
            server.starttls()
            server.login(user, password)

# 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

    send_email(
        user=user,
        password=password,
        recipients=recipients,
        subject=subject,
        body=report,
        host=host,
        port=port,
    )


def send_email(user, password, recipients, subject, body, host, port):
    message = (
        u"From: {user}\r\n"
        u"To: {to}\r\n"
        u"Subject: {subject}\r\n\r\n"
        u"{body}\r\n"
        .format(
            user=user,
            to=", ".join(recipients),
            subject=subject,
            body=body,
        )
    )
    try:
        server = SMTP(host, port)  # ("smtp.gmail.com", 587)
        server.ehlo()
        try:
            server.starttls()
            server.login(user, password)

        except SMTPNotSupportedError: