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:

Resending Emails that have Errored Out with Updated Router or Authentication Information Resending Emails that have Errored Out with Updated Router or Authentication Information
Posted by March 1, 2019
BVSTools >> BVSTools Software Discussion >> Email Tools (MAILTOOL) Specific Discussion
BVSTools Offers Toolset to Work With HubSpot OAuth 2.0 APIs On Your IBM i BVSTools Offers Toolset to Work With HubSpot OAuth 2.0 APIs On Your IBM i
Posted by January 27, 2019
BVSTools >> BVSTools Announcements
G4MSDRV Currently Not Supported G4MSDRV Currently Not Supported
Posted by January 17, 2019
BVSTools >> BVSTools Announcements >> GreenTools for Microsoft Apps (G4MS) Specific Announcements
Removing Trailing Carriage Returns and/or Line Feeds from a String with RPG Removing Trailing Carriage Returns and/or Line Feeds from a String with RPG
Posted by December 26, 2018
Programming >> RPG Programming
Create QRCODE in DDS Create QRCODE in DDS
Posted by September 21, 2018
Programming >> RPG Programming
Base64 Encoding a File with RPG Base64 Encoding a File with RPG
Posted by September 6, 2018
Programming >> RPG Programming
Building JSON with RPG and YAJL and Writing to Standard Output Building JSON with RPG and YAJL and Writing to Standard Output
Posted by August 31, 2018
Programming >> Proof of Concept (POC)
How to Delete Files or Empty Trash From Your Google Drive with your IBM i and RPG/ILE How to Delete Files or Empty Trash From Your Google Drive with your IBM i and RPG/ILE
Posted by July 24, 2018
BVSTools >> BVSTools Software Discussion >> GreenTools for G Suite (Google Apps) (G4G) Specific Discussion
GreenTools for G Suite (G4G) Updated to Include Delete and Empty Trash Function GreenTools for G Suite (G4G) Updated to Include Delete and Empty Trash Function
Posted by July 24, 2018
BVSTools >> BVSTools Announcements >> GreenTools for G Suite (Google Apps) (G4G) Specific Announcements
What to Do If Your License Keys Don't Work What to Do If Your License Keys Don't Work
Posted by July 18, 2018
BVSTools >> BVSTools Software Discussion
MAILTOOL Updated to Allow Failed Message on Invalid Recipient MAILTOOL Updated to Allow Failed Message on Invalid Recipient
Posted by May 20, 2018
BVSTools >> BVSTools Announcements >> eMail Tool (MAILTOOL) Specific Announcements
Non HTTPS Callbacks Removed from GreenTools for G Suite (G4G) Non HTTPS Callbacks Removed from GreenTools for G Suite (G4G)
Posted by April 15, 2018
BVSTools >> BVSTools Announcements >> GreenTools for G Suite (Google Apps) (G4G) Specific Announcements
IBM i Related Survey Available IBM i Related Survey Available
Posted by April 7, 2018
IBM Power Systems >> (QGPL) IBM i
BVSTools Releases Braintree Webhook Open Source Application - Node.js BVSTools Releases Braintree Webhook Open Source Application - Node.js
Posted by April 5, 2018
Programming >> Open Source
BVSTools Now Offering Web Services (BETA) BVSTools Now Offering Web Services (BETA)
Posted by April 3, 2018
BVSTools >> BVSTools Announcements

Reply




Copyright 1983-2019 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).