mguessan / davmail

DavMail POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway - Synced with main subversion repository at
http://davmail.sourceforge.net
GNU General Public License v2.0
576 stars 85 forks source link

Connect exception: java.lang.StringIndexOutOfBoundsException Range [4, -1) #281

Open haji-ali opened 1 year ago

haji-ali commented 1 year ago

Hello, I am trying davmail headless with "O365Modern" but I keep getting the error "java.lang.StringIndexOutOfBoundsException Range [4, -1)". I am sure my configuration is incomplete, but I haven't been able to find the relevant documentation.

The relevant part of my config is:

davmail.server=true
davmail.mode=O365Modern
davmail.url=https://outlook.office365.com/EWS/Exchange.asmx

I am not sure how I am supposed to pass the OAUTH2 token. I tried passing it as the password with http request (along with the username) but that didn't work.

Any help is appreciated.