The massive use of e-mail makes text categorization once more an important issue as everyone would like e-mail accounts that could prevent undesired mail successfully. Proposed method is intended to classify incoming e-mails either as unsolicited e-mails (spam) or good e-mails (ham). This prediction is based on a machine learning engine; the keywords for each one of the two categories are retained in a training stage and then used to predict the category to which new e-mails should belong, in a test stage.