Coder Social home page Coder Social logo

nioimapclient's People

Contributors

axiak avatar b3ross avatar brian5021 avatar cimmyv avatar hs-jenkins-bot avatar hubspot-dan avatar itscharlieb avatar jaredstehler avatar jhaber avatar krishtha avatar mjball avatar stevie400 avatar szabowexler avatar takahiromollenkamp avatar zklapow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nioimapclient's Issues

Could not download NioImapClient via Maven : Missing artifact

Hi ,
I'm trying to add NioImapClient as a maven dependency.

I tried

<dependency>
  <groupId>com.hubspot</groupId>
  <artifactId>NioImapClient</artifactId>
  <version>0.4-SNAPSHOT</version>
</dependency>

But I get the following error:

Missing artifact com.hubspot:NioImapClient:jar:0.4-SNAPSHOT

Can you please help me fix it ?

Several BODY[...] sections are parsed incorreclty

I'm trying to load a message with BODY[TEXT] and BODY[HEADER]:

imapClient.uidfetch(
   Set.of(106),
   FetchDataItemType.UID,
   new BodyPeekFetchDataItem("TEXT"),
   new BodyPeekFetchDataItem("HEADER")
)

According to the trace logs, everything is fine:

2021-01-06 17:44:29,651 [info] c.h.i.c.I.unknown-client - SEND: A002 UID FETCH 106 (BODY.PEEK[TEXT] BODY.PEEK[HEADER] UID)
...
2021-01-06 17:44:30,345 [info] c.h.i.p.R.unknown-client - RCV(FETCH): (UID 106 BODY[TEXT] {4043}
...
2021-01-06 17:44:30,347 [info] c.h.i.p.R.unknown-client - RCV(FETCH):  BODY[HEADER]
...

Not posting the whole log, because it's quite huge, but it's clear that the server returns both BODY[TEXT] and BODY[HEADER] sections.

However, the resulting ImapMessage object doesn't include text body. getBody returns org.apache.james.mime4j.dom.Multipart with 0 parts.

I debugged the code a bit. Looks like each of the sections is parsed separately, and then the "header" section overwrites the "text" section in the resulting ImapMessage. If I don't query header, there's no issue - the body contains the text.

I don't know if this can be fixed somehow with current ImapMessage implementation. It has only one body property, and it's not clear how to combine all the sections into a single org.apache.james.mime4j.dom.Message, but current behavior definitely looks wrong.

Could find classes ImapClientFactoryConfiguration and ImapClientConfiguration

Consider the following file com.hubspot.imap.ImapClientFactory.java

The constructor requires :

public ImapClientFactory() {
    this(ImapClientFactoryConfiguration.builder().build());
  }

ImapClientFactoryConfiguration class, but it could not be found.

Similary, the same file has the following code:

 public CompletableFuture<ImapClient> connect(ImapClientConfiguration clientConfiguration) {
    return connect("unknown-client", clientConfiguration);
  }

It requires the class ImapClientConfiguration.java. That class could also not be found.

These errors occur in lot of places in the code. These two classes could not be found in the source code. Can you please help me fix this ?

Background Question - Antlr Removal

I am curious what drove you to remove Antlr - performance, overkill for parsing tasks needed, other? Feel free to close when you respond.

Unable to build on Fedora 28

Project can't be built on Fedora (and possibly on CentOS/RHEL too) due to compilation error:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] An unknown compilation problem occurred
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.915 s
[INFO] Finished at: 2018-07-18T14:00:24+02:00
[INFO] Final Memory: 36M/510M
[INFO] ------------------------------------------------------------------------

when I run maven using -X it yields root cause (stripped only to relevant part):

-g -target 1.8 -source 1.8 -encoding UTF-8 -bootclasspath /etc/alternatives/jre/jre/lib/rt.jar:/etc/alternatives/jre/jre/lib/jce.jar:/etc/alternatives/jre/../classes/classes.jar
[DEBUG] incrementalBuildHelper#beforeRebuildExecution
[INFO] Compiling 123 source files to /home/rkosegi/git/ezz/NioImapClient/target/classes
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
[DEBUG] incrementalBuildHelper#afterRebuildExecution

Important part is /etc/alternatives/jre/jre/lib/rt.jar (jre is twice in path, actual path should be just /etc/alternatives/jre/lib/rt.jar).

This comes from basepom parent (maven compiler plugin configuration):

<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <configuration>
    <compilerArguments children.combine="append">
      <bootclasspath>${project.jdk7.home}/lib/rt.jar:${project.jdk7.home}/jre/lib/jce.jar:${project.jdk7.home}/../classes/classes.jar</bootclasspath>
    </compilerArguments>
  </configuration>
</plugin>

Question here why you configure it that way?

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.