Internet has changed the way of communication, which has become more and more concentrated on emails. Emails, text messages and online messenger chatting have become part and parcel of the people's lives. Out of all these communications, emails are more prone to exploitation. Thus, various email providers employ algorithms to filter emails based on spam and ham. In this paper, the prime aim is to detect text as well as image based spam emails. To achieve the objective, artificial neural network is applied for the classification of spam and ham emails.