In this paper, a classifier of emails by level of urgency in service companies is presented, using a natural language processing algorithm to grammatically label the unstructured text of messages to give it meaning and structure before analyzing it. The proposed classifier uses a lexical database that is composed of unigrams classified into eight basic emotions (anger, fear, anticipation, confidence, surprise, sadness, joy and disgust) and two feelings (positive and negative). This allows to compare the text of the grammatically labeled messages with the unigrams of the database, in order to conduct the analysis of emotions and feelings. The analysis determines the percentage of each emotion and the polarity of feeling in order to classify the most negative emails as urgent and channel them to the corresponding departments to be attended to. The research has been implemented using a set of data taken from a company dedicated to electronic invoicing in Mexico.