bvstone

How Do I Switch From MAILTOOL or MAILTOOL Plus to GreenTools for Google (GMail OAuth 2.0) or Microsoft Office 365?

Posted:

How Do I Switch From MAILTOOL or MAILTOOL Plus to GreenTools for Google (GMail OAuth 2.0) or Microsoft Office 365?

Recently, both Google and Microsoft have announced the ending of Basic Authentication (User and Password) for their services, including SMTP.  This means that you may need to change your applications to use a "more modern" authentication system such as OAuth 2.0.

Update: 2025 - Microsoft has phased out app passwords for outlook.com accounts, and is actively phasing out app passwords for Office 365 accounts Microsoft has also pushed back this transition to March 2026.  But I have had a few customers already forced into the change.

How Do I Know if My Organization is Using Office 365 for Email?

BVSTools has had this option available for a few years for both Office 365 and GMail.  Making the switch from using MAILTOOL or MAILTOOL Plus and SMTP Basic Authentication to OAuth 2.0 is fairly simple, but will require additional software, licenses, and setup.

What you will need:

1. MAILTOOL v12.00 or higher -  https://www.bvstools.com/mailtool.html

*Note:  If you are currently  using the MAILTOOL ILE functions, please keep in mind the latest version has removed all the hashtag (#) characters from the beginning of the function names.  This will need to be updated in programs that use those names.  For example - #mailtool_sendMail() is now mailtool_sendMail().  This change was necessary because we had overseas customers where the hashtag wasn't a valid character for them.

2. For GMail (Google) - GreenTools for Google Apps (G4G) v14.00 or higher - https://www.bvstools.com/g4g.html

      G4G - Base Product

      G4GSMAIL - Send Mail Addon

      GETURI - Used for communications in the background.  

3. For Office 365 (Microsoft) - GreenTools for Microsoft Apps (G4MS) v8.00 or higher - https://www.bvstools.com/g4ms.html

     G4MS - Base Product

     G4MSMAIL - Send Mail Addon

     GETURI - Used for communications in the background

When requesting temp keys, just request for G4G and G4MS and you'll get temp keys for everything.  Then apply the ones you need.  A lot of customers already have GETURI licensed, so if you do, you won't need a key for that.  Just G4G and G4GSMAIL and/or G4MS and G4MSMAIL.

How to use:

The first step is to make sure your DNS settings are set up properly, and that you have the *SYSTEM store created in Digital Certificate Mananger (DCM) as SSL communications are required for part of the registration.

1. Issue this command on your IBM i:

PING RMTSYS(WS.BVSTOOLS.COM) 

It should resolve to an IP address.  If not, check your DNS settings in CFGTCP option 12.

2.  Check if your *SYSTEM SSL store is set up using DCM.  Follow the instructions in this article labeled "Creating the *SYSTEM Store"  for that.  New version would be used if you are on V7R3 or higher (possibly V7R2).  If it is NOT created, you will need to create it.  It's a simple task you only have to do once.

3. Register each account you are sending email with using the appropriate command/service (G4GREGSVC and the *G4GSMAIL service for GMail or G4MSREGSVC and the *G4MSMAIL service for Office 365).  Here's a video showing the process for Office 365 and here is one for GMail.

4.  Change the SENDWITH  parameter from *MAILTOOL (or *IBMSMTP if you are using the base MAILTOOL product) to *G4GSMAIL for GMail, or *G4MSMAIL for Office 365 on the MAILTOOL command.  All the other parameters such as Port, SSL, TLS, AuthUser, and AuthPW are no longer used.

5.  The "From" address will be used to match it up with the appropriate registered account.

Or

G4G and G4MS do contain ILE functions that can be used to send emails as well, but using the MAILTOOL command (or ILE Functions) is the easiest.

For more details, see IBM i eMail Solution Paths - In-House, Google/GMail/GSuite, Microsoft Office 365 and Other Providers which has specific examples for each of these options.


Last edited 09/16/2025 at 09:30:52




Reply




© Copyright 1983-2025 BVSTools
GreenBoard(v3) Powered by the eRPG SDK, MAILTOOL Plus!, GreenTools for Google Apps, jQuery, jQuery UI, BlockUI, TinyMCE and running on the IBM i (AKA AS/400, iSeries, System i).