Home » SQL & PL/SQL » SQL & PL/SQL » How to send email with OAuth (merged) (Oracle, 12.1, Enterprise Edition, Linux)
How to send email with OAuth (merged) [message #686448] Thu, 15 September 2022 01:10 Go to next message
praveenpraj
Messages: 22
Registered: October 2011
Location: India
Junior Member
Presently we are sending emails (Office 365) from database using UTL_SMTP.
Now as microsoft is going to discontinue basic authentication for SMTP, POP, IMAP etc., and forcing Modern authentication - OAuth 2.0,
how we authenticate using OAuth through existing PLSQL procedure which is using UTL_SMTP.
How to send email with OAuth [message #686449 is a reply to message #686448] Thu, 15 September 2022 01:11 Go to previous messageGo to next message
praveenpraj
Messages: 22
Registered: October 2011
Location: India
Junior Member
Presently we are sending emails (Office 365) from database using UTL_SMTP.
Now as microsoft is going to discontinue basic authentication for SMTP, POP, IMAP etc., and forcing Modern authentication - OAuth 2.0,
how we authenticate using OAuth through existing PLSQL procedure which is using UTL_SMTP.
Re: How to send email with OAuth [message #686451 is a reply to message #686449] Fri, 16 September 2022 13:35 Go to previous message
Alien
Messages: 286
Registered: June 1999
Senior Member
Hi,

it depends on whether you already have an access token that you can use, or if you need to establish the full credential flow from the RDBMS.
In either case, UTL_SMTP.COMMAND allows you to send an AUTH, XOAUTH2 command followed by the access token. That takes care of the SMTP part.

If you need the full credentials flow, the best option is to use ORDS. In the relevant versions it has native OAUTH2 support packages. Use ORDS to get an access token, and the SMTP commands as indicated by Microsoft.

Regards,

Arian
Previous Topic: Combine 2 fields when using Groupby (merged)
Next Topic: XMLTABLE - Multiple children
Goto Forum:
  


Current Time: Fri Oct 07 05:29:31 CDT 2022