def parseEmailconf(filename):
    """
    This funtion parses all the email related configuration from the mailconfig file
    :return dictionary of email related configuration
    :param takes input mailConfig.conf
    """
    values = {}
    with open(filename, 'r') as fd:
        data = fd.readlines()

    ''' reach data from the file and parse to get email credentials and server settings'''
    for entry in data:
        entry = entry.strip('\r\n')
        tlst = entry.split('=')
        if 'TO_EMAIL' in entry:
            tolist = tlst[1].split(',')
            values.update({tlst[0]: tolist})
            '''pass the emails if comma seperated as list'''
        else:
            values.update({tlst[0]: tlst[1]})
    return (values)