Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NumberFormatException: For input string: "CAPABILITY" is being thrown when try to connect imap store #743

Open
muhammadasad928 opened this issue Dec 27, 2024 · 1 comment
Labels
question Further information is requested

Comments

@muhammadasad928
Copy link

muhammadasad928 commented Dec 27, 2024

Describe the bug
Unable to connect to imap store with imap.gmail.com host. it always throws java.lang.NumberFormatException: For input string: "CAPABILITY" , when try to connect imap store.

To Reproduce

  1. execute this peice of code

host = imap.gmail.com, email = your gmail where app password is created, appPassword = app password created in gmail

    Properties properties = new Properties();
    properties.put("mail.imap.host", host);
    properties.put("mail.imap.port", "993");
    properties.put("mail.imap.ssl.enable", "true");
    properties.put("mail.debug", "true");
    properties.put("mail.imap.enablecapability", "false");

    Session emailSession = Session.getDefaultInstance(properties);
    Store store = emailSession.getStore("imap");
    store.connect(host, email, appPassword);

Expected behavior

  1. should successfully connect with store and return store instance to perform furthur action like read Inbox etc

Screenshots
image

Desktop (please complete the following information):

  • OS: Window 11
  • Browser: Chrome
  • Version Version 131.0.6778.205

Smartphone (please complete the following information):
N/A

Mail server:

  • Protocol being used: imap
  • Vendor/product: [e.g. Microsoft Exchange]
  • Mail service URL: imap.gmail.com

Additional context
Add any other context about the problem here.

@jmehrens
Copy link
Contributor

jmehrens commented Dec 31, 2024

Please include the full stack trace and debug log. Looks like the screen shot has the trace but text from printStackTrace is helpful.

@jmehrens jmehrens added the question Further information is requested label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants