[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mail-dev] Javamail with Oauth2 to connect to an IMAP Office 365 server
|
Hello Quentin,
After spending a huge amount of time, I was able to implement OAuth 2.0 for Microsoft 365 using JavaMail 1.6.7.
Generally, the procedure is as follows if you want to use OAuth 2.0 without user intervention:
In my application, I used the properties:
Mail property mail.imaps.auth.login.disabe: true Mail property mail.imaps.auth.plain.disable: true Mail property mail.debug.auth.password: false Mail property mail.mime.ignoreunknownencoding: true Mail property mail.imaps.port: 993 Mail property mail.imaps.sasl.mechanisms: XOAUTH2 Mail property mail.store.protocol: imaps Mail property mail.imaps.ssl.enable: true Mail property mail.imaps.partialfetch: false Mail property mail.mime.decodetext.strict: false Mail property mail.debug.auth: true Mail property mail.imaps.peek: true Mail property mail.imaps.sasl.enable: true
Hope this helps. Good luck!
Regards
Andy Brunner Kappelistrasse 43, CH-8002 Zürich, Tel +41 44 482 82 29
Am 12.12.2022 um 11:52 schrieb Quentin MAISONNEUVE <quentin.maisonneuve@xxxxxxxxxxxxxxx>:
Hello,
We are reaching out to you because we need your help to use the javamail library. Microsoft is dropping the support of basic plain text auth for IMAP servers the 31 of December this year.
So we are trying to use it with the protocol Oauth 2 to connect to an IMAP Office 365 server but it dosen't seems to work despite configuring it as the documentation says. We've tried some configuration from stackOverFlow too without success. We've tried with the 1.6.7 and 2.0.1 versions of the library.
Do you have an example of configuration we can use / start with ?
PS : I've attached a the test file we are currently using, maybe you can point us out what is wrong.
Thank you by advance for your time.
Regards,
Quentin Maisonneuve Developer at XLOAN - Groupe Open
10, rue du Président Edouard Herriot, 44000 NANTES Tel. +33 02 49 09 19 08 <Outlook-1jukyd5s.png>
ATTENTION : Ce message et toutes les pièces jointes (ci-après le "message") sont confidentiels et strictement réservés aux destinataires qui procèderont aux vérifications appropriées en matière de virus. Toute utilisation ou diffusion non autorisée est interdite.Tout message électronique est susceptible d'altération. L'auteur de ce message et le Groupe Open déclinent toute responsabilité au titre de ce message s'il a été altéré, déformé, falsifié ou indûment utilisé par des tiers, ou encore s'il a causé tout dommage ou perte de toute nature.Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur.WARNING : This message and any attachments (the "message") are confidential and strictly intended for their addressees, who will conduct appropriate virus checks. Any unauthorised use or dissemination is prohibited.Messages are susceptible to alteration. The author of this message or Open Group shall not be liable for the message if altered, changed, falsified or unduly used by third parties, or for any damage or loss.If you are not receiver of this message, please cancel it immediately and inform the sender. Open, responsable de traitement, met en œuvre des traitements de données à caractère personnel à des fins légitimes, pour : ● Solliciter clients et prospects sur des offres commerciales pertinentes ● Evaluer la satisfaction client ● Offrir ou afficher un contenu qui correspond aux intérêts et responsabilités professionnels ● Contacter les parties prenantes avec des informations et des invitations orientées vers leurs intérêts et responsabilités professionnelsCes données sont destinées aux services concernés de la société Open. Pour en savoir plus :https://www.open.global/fr/personal-data-protection-policyOpen, data controller, processes personal data for legitimate purposes, to: ● Contact prospects and customers with relevant offers ● Measure customer satisfaction ● Offer or display a content related to contacts’ expectations and area of interest ● Provide third parties with invitations and information in connection with their professional responsibilities and area of interestThis data is intended for the relevant departments of Open Company. Click the link below to find out more details:https://www.open.global/en/personal-data-protection-policy _______________________________________________mail-dev mailing listmail-dev@xxxxxxxxxxxTo unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mail-dev
|
Attachment:
smime.p7s
Description: S/MIME cryptographic signature