# Path: solace/settings.py
# def configure(**values):
# def revert_to_default():
# def autodiscover_settings():
# def configure_from_file(filename):
# def describe_settings():


import os
import re
                import socket
    from email.mime.text import MIMEText
    from email.MIMEText import MIMEText
from smtplib import SMTP, SMTPException
from urlparse import urlparse
from solace import settings
        msg['Content-Transfer-Encoding'] = '8bit'
        msg['Content-Type'] = 'text/plain; charset=utf-8'
        return msg

    def format(self, sep='\r\n'):
        """Format the message into a string."""
        return sep.join(self.as_message().as_string().splitlines())

    def log(self, fp_or_filename):
        """Logs the email"""
        if isinstance(fp_or_filename, basestring):
            f = open(fp_or_filename, 'a')
            close_later = True
        else:
            f = fp_or_filename
            close_later = False
        try:
            f.write('%s\n%s\n\n' % ('-' * 79, self.format('\n').rstrip()))
            f.flush()
        finally:
            if close_later:
                f.close()

    def send(self):
        """Send the message."""
        try:
            smtp = SMTP(settings.SMTP_HOST, settings.SMTP_PORT)
        except SMTPException, e:
            raise RuntimeError(str(e))


# Path: solace/settings.py
# def configure(**values):
# def revert_to_default():
# def autodiscover_settings():
# def configure_from_file(filename):
# def describe_settings():


# Path: solace/utils/mail.py
import os
import re
                import socket
    from email.mime.text import MIMEText
    from email.MIMEText import MIMEText
from smtplib import SMTP, SMTPException
from urlparse import urlparse
from solace import settings

        msg['Content-Transfer-Encoding'] = '8bit'
        msg['Content-Type'] = 'text/plain; charset=utf-8'
        return msg

    def format(self, sep='\r\n'):
        """Format the message into a string."""
        return sep.join(self.as_message().as_string().splitlines())

    def log(self, fp_or_filename):
        """Logs the email"""
        if isinstance(fp_or_filename, basestring):
            f = open(fp_or_filename, 'a')
            close_later = True
        else:
            f = fp_or_filename
            close_later = False
        try:
            f.write('%s\n%s\n\n' % ('-' * 79, self.format('\n').rstrip()))
            f.flush()
        finally:
            if close_later:
                f.close()

    def send(self):
        """Send the message."""
        try:
            smtp = SMTP(settings.SMTP_HOST, settings.SMTP_PORT)
        except SMTPException, e:
            raise RuntimeError(str(e))


        if settings.SMTP_USE_TLS: