bvstone

MAILTOOL Update - Easier Upgrades, Configuration File Processing Update, SSL Upgrade

Posted:

MAILTOOL Update - Easier Upgrades, Configuration File Processing Update, SSL Upgrade

MAILTOOL has recently been updated to v8.10 which includes a couple of changes.

Easier Version Updates
With previous versions of MAILTOOL there were many commands you had to run to copy old data to the new MAILTOOL library when performing an update.

This latest version includes the command MAILTOOL Update (MLTUPDATE) which simply asks for the "old" MAILTOOL library where your old files exist and the "new" MAILTOOL library that was just installed.

This command will copy all the necessary data from the old library to the new, as well as any data areas and configuration files.  We hope this makes the updating process easier for you!

Configuration File Processing Updates
The latest version also has a few changes regarding Configuration File processing for both the MAILTOOL command and the ILE subprocedures.

With the old MAILTOOL Command it would look for the defaults configuration files every time.  This means if you forgot to restore them, the command would error.  On the latest version it will only look for the default configuration files if the value of *DFT is specified on the Configuration File (CONFIG) parameter.  If a specific configuration file is specified it will look for this file and only this file.  In the past if your configuration file couldn't be found it would then look for the default values.  This will no longer happen.  The MAILTOOL  command will, in the case of not finding a specific configuration file, issue an error.

Also with the MAILTOOL Command any non-blank values in the configuration file will override anything on the command.  This means if a value is blank or the label simply doesn't exist in the configuration file the value specified on the command will not be overridden.

With the MAILTOOL ILE Functions there is a small coding change needed if you are using configuration files.  In the past, the #mailtool_init() subprocedure would load values from the configuration file (or default configuration file).  This means you had to use the #mailtool_setValue() subprocedure to set the configuration file before initialization.  After some use, we found this to be less intuitive and useful than originally thought.

With this update we've added the #mailtool_loadDefaults() subprocedure available so that you can choose when to load defaults from a configuration file.  

Your old code may have looked like this:

         rc = #mailtool_setValue('configuration_file':             
                                 '/bvstools/bvstone_mailtool.json');                
                                                          
         if (#mailtool_init() >= 0);                                
           rc = #mailtool_addTORecipient('bvstone@bvstools.com');  
           rc = #mailtool_setValue('subject':Subject);             
           rc = #mailtool_setValue('message':Message);             
           rc = #mailtool_sendMail(errMsg);                        
         endif;   

With the latest version we will need to set the value for the configuration_file AFTER the #mailtool_init() subprocedure and then call the #mailtool_loadDefaults() subprocedure to load those values.  The new updated version would be as follows:

         if (#mailtool_init() >= 0);                                
           rc = #mailtool_setValue('configuration_file':             
                                   '/bvstools/bvstone_mailtool.json');                
           rc = #mailtool_loadDefaults();
           rc = #mailtool_addTORecipient('bvstone@bvstools.com');  
           rc = #mailtool_setValue('subject':Subject);             
           rc = #mailtool_setValue('message':Message);             
           rc = #mailtool_sendMail(errMsg);                        
         endif; 

We understand this update will require you to make code changes to anything already using the old method, but in the long run I hope you'll find, as we have, that this allows much more flexibility and is much more intuitive.  You could even set up multiple partial configuration files and load more than one for different sets of defaults.  So, we feel this update adds a lot of value and options to the email processing procedures.

Also, remember that unless you change the ignore_blanks value (which defaults to *YES) any blank value or non-existing value in the configuration file will not override any already value that has been set by the #mailtool_setValue() subprocedure.

As always, feel free to contact us at BVSTools for any questions or clarifications.


Last edited 06/09/2015 at 17:11:27



Latest Posts:

MAILTOOL Updated to Allow G4GSMAIL as Option in Routers File MAILTOOL Updated to Allow G4GSMAIL as Option in Routers File
Posted by June 28, 2020
BVSTools >> BVSTools Announcements >> eMail Tool (MAILTOOL) Specific Announcements
BVSTools Now Offers Interface with Infor's ION APIs BVSTools Now Offers Interface with Infor's ION APIs
Posted by May 15, 2020
BVSTools >> BVSTools Announcements
More V7R4 IFS File CCSID Issues and The Fix More V7R4 IFS File CCSID Issues and The Fix
Posted by March 4, 2020
IBM Power Systems >> (QGPL) IBM i
Error Retrieving IP Address by Name Error Retrieving IP Address by Name
Posted by February 25, 2020
BVSTools >> BVSTools Software Discussion
Logging jobs that hit an outq Logging jobs that hit an outq
Posted by February 13, 2020
Programming >> CL Programming
GreenTools for Google Apps (G4G) v12.60 Released with Shared Drive Features and More... GreenTools for Google Apps (G4G) v12.60 Released with Shared Drive Features and More...
Posted by February 4, 2020
BVSTools >> BVSTools Announcements >> GreenTools for G Suite (Google Apps) (G4G) Specific Announcements
Allowing Requests over Port 80 For SSL Validation (ie, Namecheap, etc) Allowing Requests over Port 80 For SSL Validation (ie, Namecheap, etc)
Posted by January 31, 2020
Programming >> Web Programming
GreenTools for Slack (G4SLK) v3.00 Released GreenTools for Slack (G4SLK) v3.00 Released
Posted by January 17, 2020
BVSTools >> BVSTools Announcements >> GreenTools for Slack (G4SLK) Specific Announcements
Calling a QSH Command from RPG Calling a QSH Command from RPG
Posted by December 26, 2019
Programming >> RPG Programming
SPLTOOL Print Range (PRTRNG) Function Updated to Handle Spooled Files up to 999,999,999 Pages SPLTOOL Print Range (PRTRNG) Function Updated to Handle Spooled Files up to 999,999,999 Pages
Posted by December 14, 2019
BVSTools >> BVSTools Announcements >> Spooled File Tools (SPLTOOL) Specific Announcements
GreenTools for Microsoft Apps (G4MS) Updated to v6.00 - Now Uses Microsoft Graph APIs GreenTools for Microsoft Apps (G4MS) Updated to v6.00 - Now Uses Microsoft Graph APIs
Posted by November 24, 2019
BVSTools >> BVSTools Announcements >> GreenTools for Microsoft Apps (G4MS) Specific Announcements
V7R4 Changes CCSID of Compressed File Using PASE JAR Command - Here's The Fix V7R4 Changes CCSID of Compressed File Using PASE JAR Command - Here's The Fix
Posted by November 21, 2019
IBM Power Systems >> (QGPL) IBM i
Using GETURI to Make OAuth 2.0 Requests - Custom Headers for Access Tokens Using GETURI to Make OAuth 2.0 Requests - Custom Headers for Access Tokens
Posted by November 11, 2019
BVSTools >> BVSTools Software Discussion >> Get URI (GETURI) Specific Discussion
GreenTools for Microsoft Apps (G4MS) v5.00 Released with Updated OneDrive Support and 3rd Party Functionality GreenTools for Microsoft Apps (G4MS) v5.00 Released with Updated OneDrive Support and 3rd Party Functionality
Posted by October 20, 2019
BVSTools >> BVSTools Announcements >> GreenTools for Microsoft Apps (G4MS) Specific Announcements
BVSTools is Now Running V7R4M0 BVSTools is Now Running V7R4M0
Posted by September 28, 2019
BVSTools >> BVSTools Announcements

Reply




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