Regex Comment Handler for Mail Fetching Service

XMLWordPrintable

      For emails that have a format where reply and quoted message have some arbitrary "divider", I have implemented a flexible regex-based comment handler.

      Given a regex pattern for the divider, it will split the email body, returning only the first part as the comment.

      If the pattern is not found, it returns the email body unchanged
      If the regex is not specified, it returns the email body unchanged
      If there is any error (ie regex expression error), it returns the email body unchanged
      (See the tests for more details)

      Our immediate need is to clean the junk out of emails that Lotus Notes puts there. None of the existing handlers do anything close to what needs to be done.

      If you could merge it into the next release, that would be grand.

      -Nick

      (see attached Handler + test)

        1. RegexCommentHandler.java
          2 kB
          Nick Minutello
        2. TestRegexCommentHandler.java
          6 kB
          Nick Minutello

            Assignee:
            Unassigned
            Reporter:
            Nick Minutello
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: