Carlos Vega (ISI Condal) asked a question.

Implementing OAuth2 for sending emails with Office 365 or Gmail in Progress OpenEdge

Hello everyone!

 

I'm looking to implement a more modern and secure solution for sending emails from my Progress OpenEdge application. 

 

My application runs on Microsoft Windows enviroments and I use Progress Openedge 12.2.13.

 

Currently, I am using the System.Net.Mail dotNet class to send emails over SMTP, which requires users to configure their Office 365 accounts to allow it.

 

However, with the evolution of technology and security, I'd like to explore the possibility of using Oauth2 to send emails through services like Office 365 or Gmail. Has anyone had success implementing Oauth2 for sending emails from a Progress OpenEdge application?

 

I appreciate any advice, experiences, or resources you can share on this topic.

 

Thank you in advance for your help!


    • Carlos Vega (ISI Condal)

      Thanks for your answer.

      This would work for Microsoft Office 365.

      In Google Gmail it would be something different

      • Ezequiel Montoya (Mercadeo Comercial S.A.)

        Hola, estoy exactamente en eso, ¿pudiste resolverlo?

      • Carlos Vega (ISI Condal)

        No. Y especialmente con Google Gmail nunca conseguí un método que funcionara. Ahora actualizado el hilo a ver si alguien nos ayuda 😅

  • Carlos Vega (ISI Condal)

    I'm update the thread about some tests I did.

     

    I recently test MailKit library:

     

    https://github.com/jstedfast/MailKit

     

    I attach a code snippet to successfully send via SMPT.

     

    It is necessary to use the -assemblies parameter to bin subfolder

     

    Has anyone managed to get Microsoft Office 365 or Google Gmail account working with OAuth2 using MailKit and Openedge?

     

    I'm using Progress 12.2.16.

     

    I'd appreciate your help.

    • Peter Judge (Consultingwerk)

      The hardest part is getting the JWT that you need to authenticate to Office 365. The OAuth2 / OICD flows bascially require a call back into the client that makes the request, and OpenEdge is not re-entrant in that way.

       

      @Mike Fechner (Consultingwerk)​ and I did a webinar on this subject a little while ago ... you can find the recording on YouTube . Hopefully it's useful.

  • Carlos Vega (ISI Condal)

    There is some new news regarding SMTP Basic Authentication.

    Microsoft has confirmed that Basic Auth for SMTP AUTH will be retired in the coming years, pushing everyone toward OAuth 2.0.

     

    This is especially relevant for legacy systems, custom integrations, scripts, and devices that still rely on username/password SMTP.

     

    If your OpenEdge apps send email via SMTP AUTH, it’s a good moment to review alternatives (OAuth support) before this becomes mandatory.

     

    https://techcommunity.microsoft.com/blog/exchange/updated-exchange-online-smtp-auth-basic-authentication-deprecation-timeline/4489835

  • Patrik Wikström (Digia Finland Oy)

    It would also be nice to know what solutions people are choosing and why?