import csv


def get_email_addresses() -> dict:
    """
    Function that reads the emails.csv file and returns a dictionary that can server as a one way mapping based on the data from the file.
    The first column is the name of the person and the second column the email address.
    Leading and trailing spaces are removed
    :return: the dictionary with the mapping
    """
    mapping = {}
    with open("emails.csv", mode="r", newline="") as csvfile:
        reader = csv.reader(csvfile, delimiter=",", quotechar="|")
        for row in reader:
            if len(row) < 2:
                continue
            mapping[row[0].lower().strip()] = row[1].strip()

    return mapping