PageRenderTime 45ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/README.md

https://gitlab.com/brunokenshin/jmic
Markdown | 72 lines | 57 code | 15 blank | 0 comment | 0 complexity | 22c82f2058386ffbaad765dbd479f913 MD5 | raw file
  1. # Java Mail Info Collector - JMIC [![wercker status](https://app.wercker.com/status/2fd82aede5750d80a0e51d1df3e85835/s "wercker status")](https://app.wercker.com/project/bykey/2fd82aede5750d80a0e51d1df3e85835)
  2. JMIC is a simple webapp to extract important information from emails using specific patterns.
  3. Project uses Java 7, Spring Boot as core framework application, gradle 2.12 as building tool and Maven Central as dependencies repository.
  4. It generates a '.war' file that can be depployed into a servlet-container like Tomcat. JMIC uses MySQL but you can change for another SQL database.
  5. # Limitations:
  6. - Must be only one persistance table for all fields
  7. - Persistance table MUST have column "ID" (Primary Key) and it must be the ONLY "NOT NULL" column.
  8. - Since mail fields are matched using regular expressions, user must know its syntax. Maybe even java particularities for it like special character escapes.
  9. # Dependencies:
  10. - mysql:mysql-connector-java
  11. - com.h2database:h2:1.4.191
  12. - org.apache.commons:commons-email:1.4
  13. - org.apache.commons:commons-lang3:3.4
  14. - org.springframework.boot:spring-boot-starter-jdbc
  15. - org.springframework.boot:spring-boot-starter-mail
  16. - org.springframework.boot:spring-boot-starter-web
  17. - org.springframework.boot:spring-boot-starter-tomcat
  18. - org.springframework.boot:spring-boot-starter-test
  19. # Filters configuration:
  20. These configurations defines which emails jmic will consider to do all the work. The more restricted search, faster will be the process.
  21. - subject
  22. + Sets keywords that lib should search at messages subject.
  23. + If null, it will search all message subjects
  24. - sender
  25. + Sets the sender email that lib should search.
  26. + If null, it will search all senders.
  27. - unread
  28. + Sets the read/unread mail flag.
  29. + 'True' will search for unread mails.
  30. + 'False' will search for read mails.
  31. + If null, it will search for both.
  32. - daysago
  33. + Sets the how much days from now to past the app should search.
  34. + If null, it will search all the time.
  35. + PS: The bigger it is, more mails will catch and can let the system too slow. If let it null, will get all time emails and its VERY UNRECOMENDED!
  36. # Fields configuration:
  37. These are the fields that you want to get from the messages.
  38. - fieldName
  39. + Represents the name of the field defined by his patterns.
  40. - fieldStartPattern
  41. + Defines the pattern that mark the start of the wanted information.
  42. - fieldEndPattern
  43. + Defines the pattern that mark the end of the wanted information.
  44. # Important:
  45. For google accounts maybe you need to active the "Less secure apps" option:
  46. - https://www.google.com/settings/security/lesssecureapps
  47. # References:
  48. - http://www.compiletimeerror.com/2013/06/reading-email-using-javamail-api-example.html#.VvBXfHyrRD8
  49. - http://www.oracle.com/technetwork/java/javamail/faq/index.html#gmail
  50. - https://gusto77.wordpress.com/2012/04/03/extracting-text-from-email-message-with-javamail/
  51. - http://stackoverflow.com/questions/870045/java-imap-fetch-messages-since-a-date
  52. # Mirrors:
  53. - https://gitlab.com/brunokenshin/jmic
  54. # Stable Versions:
  55. - https://gitlab.com/groups/viladosite_projs/jmic
  56. # Build Information:
  57. [![wercker status](https://app.wercker.com/status/2fd82aede5750d80a0e51d1df3e85835/m "wercker status")](https://app.wercker.com/project/bykey/2fd82aede5750d80a0e51d1df3e85835)