Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Navigation: Subroutines > EMAILX > EMAILX Scenarios

XOAUTH2 Authentication

Scroll Prev Top Next More

XOAUTH2 is a Microsoft extension to the OAUTH2 protocol, and is an increasingly popular SMTP authentication method. To implement it in EMAILX, you must first use the subroutine OAUTH2 to obtain an "access token;" see note below. The access token is then passed to EMAILX in place of the password, which combines it with the user name for transmission to the SMTP server according to the XOAUTH2 protocol.

 

Creating an Access Token

Typically this involves first creating an API account with the provider of the SMTP server, such as Google or Azure, and then executing the three-legged procedure in which you send your client tokens to the API which sends back a custom URL which the app then uses a browser to redirect the end user to log in and request access. Once accomplished, the access token will last for a certain amount of time, and can be refreshed without further user interaction for a much Typically this involves first creating an API account with the provider of the SMTP server, such as Google or Azure, and then executing the three-legged procedure in which you send your client tokens to the API which sends back a custom URL which the app then uses a browser to redirect the end user to log in and request access. Once accomplished, the access token will last for a certain amount of time, and can be refreshed without further user interaction for a much longer amount of time.