bvstone

Easily Override the SNDDST or SNDSMTPEMM IBM Commands to Use MAILTOOL!

Posted:

Easily Override the SNDDST or SNDSMTPEMM IBM Commands to Use MAILTOOL!

With MAILTOOL v14.00 and up, you now have the ablility to override the functionality of the SNDDST or SNDSMTPEMM IBM commands to use MAILTOOL in the background!

Why is this important?  Microsoft has changed their authentication requirements to use "More Secure Methods" which includes OAuth 2.0.  IBM has stated they will not be updating their email clients to work with this.

We've had requests from customers to be able to use MAILTOOL and the authentication processes available without needing to change a line of code.  Well, this new version of MAILTOOL does just that!  

What do you need to use this functionality?

MAILTOOL - https://www.bvstools.com/mailtool

This will require a license key for MAILTOOL.

For Microsoft Office 365:
G4MS - https://www.bvstools.com/g4ms

This will require licenses for G4MS, G4MSMAIL and GETURI

For GMail (Google):
G4G - https://www.bvstools.com/g4g

This will require licenses for G4G, G4GSMAIL and GETURI

Other requirements are that you will need to have your system use the commands and processing programs in the MAILTOOL library.
 
For SNDDST:
CHGCMD CMD(QSYS/SNDDST) PGM(*LIBL/SNDDSTRG)
or
RNMOBJ OBJ(QSYS/SNDDST) OBJTYPE(*CMD) NEWOBJ(SNDDSTX)
or
Prefix SNDDST command with the MAILTOOL library when calling it:
MAILTOOL/SNDDST
    
For SNDSMTPEMM:
RNMOBJ OBJ(QSYS/SNDSMTPEMM) OBJTYPE(*CMD) NEWOBJ(SNDSMTPEMX)
RNMOBJ OBJ(QTCP/SNDSMTPEMM) OBJTYPE(*CMD) NEWOBJ(SNDSMTPEMX) 
or
Prefix the SNDSMTPEMM with the MAILTOOL library:
MAILTOOL/SNDSMTPEMM
 
You will also need to make sure these changes stay in place after applying PTFS, installing new OS versions, etc.
     
You will also need at least MAILTOOL in your library list.  If you  are using G4G or G4MS, you will also need that library in the library list as well.
   
The data area SDCONFIG in the MAILTOOL library should be updated to either include a fully qualified path to a configuration file to use with either G4G or G4MS or the value of *DFT. 
 
The value of *DFT will attempt to look for a configuration file named:
/bvstools/mailtool/config/[userid]/defaults.json
 
If a specific file for the userid isn't found then MAILTOOL will look for a file named:
/bvstools/mailtool/config/defaults.json
 
Example config file for G4MS:
{"variables":
 [
  {"name":"send_with_server_type","default":"*G4MSMAIL"},
  {"name":"debug","default":"*NO"},
  {"name":"debug_file","default":"mailtooldebug_/%id%/.txt"},
  {"name":"debug_smtp_file","default":"mailtoolsmtp_/%id%/.txt"}
 ]
}

Other Resources:

How Do I Switch From My Current IBMi Email Solution to GreenTools for Google (GMail OAuth 2.0) or Microsoft Office 365?

Contact us with any questions or concerns.

 

Last edited 11/14/2025 at 12:25:14




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).