Chapter 2 - MAILTOOL Plus! Options

The MAILTOOL Plus! add on allows you to bypass the standard IBM SMTP server entireley when sending an email.

To use the MAILTOOL Plus! option, simply specify the following parameters on the MAILTOOL or SPL2EMAIL command:

SENDWITH(*MAILTOOL)

If you are using an email router, then you also should specify the following:

MAILRTR(xx.xx.xx.xx)

USERTR(*ONLY)

Replace xx.xx.xx.xx with your mail router. Specifying USERTR(*ONLY) tells MAILTOOL Plus! that you only want to use the mail router. Specifying *YES will tell MAILTOOL Plus! to try and deliver the email first directly to the end user, and if that fails to use the mail router. In most cases where a mail router is used, the *ONLY value should be used on the USERTR parameter.

If there are any errors detected when sending the email, or if you have opted to save an email, log entries are made that are then displayed in the MAILTOOL Plus! Log (MTPLUSLOG) display. Using this display you can resend the email to all recipients, or only to those that did not receive the email.

When an email is saved in the MAILTOOL Plus! Log, the original MIME file as well as a JSON configuration file specific to that email are saved in the temporary directory (normally /tmp unless that is overridden).

MAILTOOL Plus! Log (MTPLUSLOG)

  7/05/14                      MAILTOOL Plus! Log                       15:08:24                                                                   Type options, press Enter.    2=Details 4=Delete  5=Show Email   10=Resend to All  11=Resend to Error Only    

Opt From                                        Rcpts  Sent     Date     Time   
__ bvstone@gmail.com                               1     0 07/07/2014 14:55:32      
   Please review the following attachment at your leisure   
__ bvstone@gmail.com                               2     1 07/07/2014 15:03:23      
   This is a really long subject so we can test to see what is going on in...   
__ bvstone@gmail.com                               1     1 07/07/2014 15:04:13      
   Test email that should work and be saved                                                                            

Bottom   F3=Exit   F5=Refresh

The MTPLUSLOG command allows you to view emails that were not successfully sent and also those that were saved. It also gives you the option to resend the emails to all of the original recipients, or to just those who did not receive the original email.

In this example we see that two emails were in error. The first was sent to 1 recipient, and zero recipients received the email. The second example shows that the email was sent to 2 recipients, and only 1 received the email. The third email was sent successfully. It is in the log because the save option was used.

The following options are available:

  • 2=Details - Display the recipient email details. On this screen you will be able to see which recipients received the email and which did not. And example of this screen is shown in the next section.
  • 4=Delete - Delete this entry from the log including the Mime file and configuration file that was created for the email.
  • 5=Show Email - Display the Mime file that was created for this email. This file will contain all of the information about the email including the sender, recipients, subject and message.
  • 10=Resend to All - Resend the email to all of the recipients. This option will remove all log entries. If errors occur again the display will be repopulated.
  • 11=Resend to Error Only - Resend the email to only the recipients that did not receive the email.

MAILTOOL Plus! Error Log Details

  7/05/14                  MAILTOOL Plus! Log Details                  
 10:57:56                                                                
 
 Type options, press Enter. 
  2=Edit  4=Delete 
                                                                                
 Opt Recipient                                                              Type
  __ bvstone@yahoo.com                                                      To:
  __ error2@hhhhhhhh.com                                                    To:
 
                                                                         Bottom 
 F3=Exit   F5=Refresh  F6=Add

The following screen will be displayed when option 2 is used from the entry screen. This display will list the recipients of the email. Recipients listed in red are those that the email was not sent to.

In this example we see that There were two recipients. The first received the email successfully, the second did not.

The following options are available:

  • 2=Edit - This option will allow you to change the recipient value. This option is useful when you may have typed the email address incorrectly.
  • 4=Delete - Delete this recipient from the log.

You can also use the F6 option to add a new recipient to the email. While this will allow you to send the email to this new recipient, the MIME header file will NOT be changed to show that information.

MAILTOOL Plus! Resend Email

10/11/18                      MAILTOOL Plus! Log                     S216709W 
15:52:37                         Resend Email                        BVSTONE  
                                                                              
Mime File: /tmp/mlt84027_MIME.mailtooltmp                                     
From: bvstone@bvstools.com                                                    
Send To: All                                                                  
                                                                              
Configuration File: /tmp/mlt84027_MIME.mailtooltmp_config.json                
                                                                              
Note: The configuration file listed above was created when the email was      
      originally sent and should remain as is.                                

12=Cancel

The following screen will be displayed when option 10 or 11 is used to resend an email. The details of the MIME file that will be used as well as the custom configuration file are displayed.

While you are allowed to change the Configuration File, it is best that instead you edit the configuration file listed to fix any errors, if possible.

The MAILTOOL Plus Resend (MTPRESEND) command

MAILTOOL Plus has a resend command that will allow to to automatically try and resend emails. You have the option of resending to those in error only, or all entries in the MTPLUSLOG display.

                        MAILTOOL Plus Resend (MTPRESEND)                       
                                                                               
 Type choices, press Enter.                                                    
                                                                               
 Send to All Recipients . . . . .   *ERR          *ERR, *YES                   
 Configuration File . . . . . . .   *DFT                                       
                                                                               
                                                                               
 Prompt Before Running  . . . . .   *YES          *YES, *NO                    

 F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display   
 F24=More keys                                                                 

Specify *ERR to send only to emails that had an error, or *YES to send to all entries in the MTPLUSLOG file.

If you are specifying *YES, please make sure this is what you want to do, as it will attempt to resend all emails saved.

The Configuration File parameter is used to specify the configuration to use when sending the email. The value of *DFT will use the default configuration file that was created when the email was originally sent. It is possible to specify another configuration file to be used if you needed to override any of the values in the original files.

10/11/18                    MAILTOOL Plus! Resend                    S216709W
15:54:29                         Confirmation                        BVSTONE 
                                                                             
           Send Error emails ONLY: YES                                       
                                                                             
 Send ALL emails in the MTPLUSLOG: NO                                        
                                                                             
         Emails that will be sent:          2                                
                                                                             
               Configuration File: *DFT                                      
                                                                             
                     Press F6 to confirm your selection.                     
                                                                             
F6=Confirm   F12=Cancel                                                      

The following display is shown after entering the MTPRESEND command. The purpose of this screen is for you to verify the values you have entered. Once you're sure that the values are correct, press the F6 command key to process the emails to be resent.

The MTPSAVE Data Area

The MTPSAVE Data Area with v7.10 and up is used to store the default value for the SAVE parameter on the MAILTOOL Command. This will also be the value that will be used if the save_email parameter is set to *DFT.

MAILTOOL Distribution Lists (MLTDSTL)

Use the MAILTOOL Distribution List (MLTDSTL) command to work with distribution lists.

When using MAITLOOL Plus, you can specify a distribution list on the To, CC or BCC parameters to send to all recipients listed in a distribution list. Simple preceed the list name with the * character.

For example, if you had a distribution list named CUSTOMERS, you could specify *CUSTOMERS on the To, CC or BCC address line to tell MAILTOOL Plus that you wanted to send to all addresses listed in this specific distribution list.

With MAILTOOL v6.08 and up, you can now specify the "type" of recipient for each entry in a distrubtion list. The valid types are:

  • *DFT - The type of recipient will be dependent on which type of recipient (TO, CC or BCC) the distribution list is specified on
  • *TO - The recipient will always be included as a TO recipient
  • *CC - The recipient will always be included as a CC recipient
  • *BCC - The recipient will always be included as a BCC recipient