def simple_mail(send_to, subject, text, send_from=None, username=None,
    password=None, server='smtp.gmail.com', port=587):
    """
    Simple utility mail function - only text messages without attachments.

    *Note* - In Gmail you'd have to allow 'less secure apps to access your account'. Not recommended for secure information/accounts.

    :param send_to: Email recipients
    :type send_to: list or string
    :param subject: Email Subject
    :param text: Email Body
    :param send_from: Name of sender
    :param username: Login username
    :param password: Login password
    :param server: Mail server
    :param port: Connection port
    """
    import smtplib
    from email.mime.multipart import MIMEMultipart
    from email.mime.text import MIMEText
    from email.utils import COMMASPACE, formatdate
    assert username is not None and password is not None
    if send_from is None:
        send_from = username
    if not isinstance(send_to, list):
        send_to = [send_to]
    message = MIMEMultipart()
    message['From'] = send_from
    message['To'] = COMMASPACE.join(send_to)
    message['Date'] = formatdate(localtime=True)
    message['Subject'] = subject
    message.attach(MIMEText(text))
    smtp = smtplib.SMTP(server, port)
    smtp.starttls()
    smtp.login(username, password)
    smtp.sendmail(send_from, send_to, msg=message.as_string())
    smtp.quit()
