import email


def process(data):
    """Extract required data from the mail"""
    
    mail = email.message_from_string(data[1])
    return {
        'date': mail['Date'], 
        'to': mail['To'], 
        'from': mail['From'], 
        'message': mail.get_payload() }