Code Monkey home page Code Monkey logo

email_test_exercise's Introduction

Project:

It’s known that emails can have attachments, some even have other emails as attachments. This allows them to have attachments at any level of nesting. Emails can be stored in so called Internet Message Format, files in this format usually have .eml extension.

Let’s assume that someone could execute the following operations for arbitrary number of times in a random order:

  • Attach EML or ZIP file to the email
  • Archive list of emails to the root folder of ZIP archive

So the sequence of operations is a storing format for the original set of files. For example ZIP archive can contain emails with ZIP archive as attachment and the last one ZIP archives contain emails with email as attachment (see samples provided).

Requirements:

You need to write a CLI program that extracts files from the provided file based on the provided format. See sample output for the sample above. You must not guess input file format and the program should allow the user to specify input format in some way, as a command line argument for example. Program should raise an error if an input file cannot be converted based on the provided format. For EML files handling it is highly recommended to use Java Mail library ( https://javaee.github.io/javamail ), MimeMessage, Multipart,BodyPart classes in particular. For ZIP files handling it is recommended to use java.util.zip package from Java SE. Solution should have quite good quality, which means it should be covered by tests, be able to work with real-life emails (as this one) and quite large ZIP archives.

email_test_exercise's People

Contributors

igor-suhorukov avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.