def set_mail_from(message):
    """
    Returns a string to be used to fill the 'from' field of and email
    If no from address is provided in the html form, return 'from_default'
    """
    # If a from address is included in html form, return it
    if 'mail_from' in message and message['mail_from']:
        return message['mail_from']
    # If there is no explicit mail_from, return the  user's submitted email
    if 'email' in message and message['email']:
        return message['email']
    # If neither mail_from nor email is available, return from_default
    return 'from_default'