# Path: will/settings.py
# def auto_key():
# def import_settings(quiet=True):
#         DEPRECATED_BUT_MAPPED_SETTINGS = {
#             "USERNAME": "HIPCHAT_USERNAME",
#             "PASSWORD": "HIPCHAT_PASSWORD",
#             "V1_TOKEN": "HIPCHAT_V1_TOKEN",
#             "V2_TOKEN": "HIPCHAT_V2_TOKEN",
#             "TOKEN": "HIPCHAT_V1_TOKEN",
#             "ROOMS": "HIPCHAT_ROOMS",
#             "NAME": "HIPCHAT_NAME",
#             "HANDLE": "HIPCHAT_HANDLE",
#             "DEFAULT_ROOM": "HIPCHAT_DEFAULT_ROOM",
#             "SLACK_DEFAULT_ROOM": "SLACK_DEFAULT_CHANNEL",
#         }
#             IO_BACKENDS = []


import requests
from will import settings



class EmailMixin(object):

    def send_email(self, from_email=None, email_list=[], subject="", message=""):
        if not hasattr(settings, 'MAILGUN_API_KEY'):
            raise Exception("Will requires a Mailgun api key in the environment variable MAILGUN_API_KEY")

        if from_email is None:
            if hasattr(settings, 'DEFAULT_FROM_EMAIL'):

# Path: will/settings.py
# def auto_key():
# def import_settings(quiet=True):
#         DEPRECATED_BUT_MAPPED_SETTINGS = {
#             "USERNAME": "HIPCHAT_USERNAME",
#             "PASSWORD": "HIPCHAT_PASSWORD",
#             "V1_TOKEN": "HIPCHAT_V1_TOKEN",
#             "V2_TOKEN": "HIPCHAT_V2_TOKEN",
#             "TOKEN": "HIPCHAT_V1_TOKEN",
#             "ROOMS": "HIPCHAT_ROOMS",
#             "NAME": "HIPCHAT_NAME",
#             "HANDLE": "HIPCHAT_HANDLE",
#             "DEFAULT_ROOM": "HIPCHAT_DEFAULT_ROOM",
#             "SLACK_DEFAULT_ROOM": "SLACK_DEFAULT_CHANNEL",
#         }
#             IO_BACKENDS = []


# Path: will/mixins/email.py
import requests
from will import settings




class EmailMixin(object):

    def send_email(self, from_email=None, email_list=[], subject="", message=""):
        if not hasattr(settings, 'MAILGUN_API_KEY'):
            raise Exception("Will requires a Mailgun api key in the environment variable MAILGUN_API_KEY")

        if from_email is None:
            if hasattr(settings, 'DEFAULT_FROM_EMAIL'):

                from_email = settings.DEFAULT_FROM_EMAIL