import smtplib


def send_email(addresses, subject, body, sender, mailhost='localhost'):
    """
    Sends an email to a list of recipients. Returns ``True`` when done.

    :param addresses:
        List of email recipients

    :param subject:
        The email subject

    :param body:
        The email body

    :param sender:
        The email sender

    :param mailhost:
        (Optional) Mail server address
    """
    for email in addresses:
        header = 'From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n' % \
            (sender, email, subject )
        message = header + body
        server = smtplib.SMTP(mailhost)
        server.sendmail(sender, email, message)
        server.quit()

    return True