Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/driftt/emailreplyparser
Small Java library to parse plain text email content
https://github.com/driftt/emailreplyparser
Last synced: 19 days ago
JSON representation
Small Java library to parse plain text email content
- Host: GitHub
- URL: https://github.com/driftt/emailreplyparser
- Owner: Driftt
- Created: 2014-10-04T23:00:00.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-12-17T03:36:47.000Z (about 1 year ago)
- Last Synced: 2024-03-26T22:08:48.345Z (10 months ago)
- Language: Java
- Size: 12.7 KB
- Stars: 24
- Watchers: 12
- Forks: 15
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Email Reply Parser for Java
A port of GitHub's Email Reply Parser library, by the fine folks at [Driftt](http://www.driftt.com/).## Summary
Email Reply Parser makes it easy to grab *only* the last reply to an on-going email thread.
Say you'd like to parse out a user's response to your transaction email messages:
```
Yes that is fine, I will email you in the morning.On Fri, Nov 16, 2012 at 1:48 PM, Driftt wrote:
> Our support team just commented on your open Ticket:
> "Hi Rico, can we chat in the morning about your question?"
```Email clients handle reply formatting differently, making parsing a pain. [We include tests for many cases](https://github.com/Driftt/EmailReplyParser/tree/master/src/test/resources/emails). The parsed email:
```
Yes that is fine, I will email you in the morning.
```[![Build Status](https://travis-ci.org/Driftt/EmailReplyParser.svg?branch=master)](https://travis-ci.org/Driftt/EmailReplyParser)
## Installation
Using maven:
```xml
com.driftt.email
EmailReplyParser
0.1
```## Tutorial
### How to parse an email message
Step 1: Import email reply parser package
```java
import static com.driftt.email.EmailMessage.read;
```Step 2: Provide email message as type String
```java
EmailMessage message = read(contents);
```### How to only retrieve the reply message
Step 1: Import email reply parser package
```java
import static com.driftt.email.EmailMessage.read;
```Step 2: Provide email message as type string using parse_reply class method.
```java
String reply = read(contents).getReply();
```