#mailtool_setValue

  *//////////////////////////////////////////////////////////////*
  * #mailtool_setValue  - Set Value of Field                     *
  *                                                              *
  * Input:                                                       *
  *   in_parameter (required) - The parameter name.              *
  *   in_value (required) - The value of the parameter.          *
  *   in_ignoreBlanks - Ignore the request to set the value      *
  *                      if it is blank.                         *
  *                                                              *
  * Output:                                                      *
  *   out_errMsg - The error message (if error exists).          *
  *                                                              *
  * Returns:                                                     *
  *   -1 for error, 0 for no error.                              *
  *                                                              *
  *//////////////////////////////////////////////////////////////*
D #mailtool_setValue...                                        
D                 PR            10i 0                          
D  in_parameter                256    Varying Value            
D  in_value                  65535    Varying Value            
D  in_ignoreBlanks...                                          
D                                 N   Value Options(*NOPASS)   
D  out_errMsg                  256    Options(*NOPASS)      


This function is used to set values in the program.  Any value used by this function will override any of the default values specified in the default configuration file.

The available values are as follows:
  • from_email - The "From" email address. (Required)
  • from_name - The "From" name.
  • subject - The email subject.
  • message - The email message.
  • reply_to_email - The reply to email address.
  • reply_to_name - The reply to name.
  • mdn_email - The MDN email address.
  • mdn_name - The MDN name.
  • sender_email - The sender email address. 
  • sender_name - The sender name.
  • footer_stream_file - The fully qualified IFS path and name of the file to use as a footer.
  • message_id - The message ID to use in the email.  The default is blank (none).  Specify *SYS to have the system generate an ID, or provide your own.
  • message_id_domain - The default is blank.  Specify the domain of the message.  *DFT can be used or you can provide your own.
  • send_with_server_type - Specify the server used to send the mail.  The default is *IBMSMTP which will use the IBM SMTP server to deliver the email.  You can also specify *MAILTOOL to use the MAILTOOL Plus option and bypass IBM's email systems (preferred).
  • mail_router - If using MAILTOOL Plus, specify the mail router to use.
  • use_mail_router - Specify if you want to use a mail router when sending with MAILTOOL Plus.  If you specify a router, this field should be set as *ONLY.  Other values are *YES (which will use the router only as a last resort) or *NO which will not use the mail router.
  • perform_mx_lookup - Specify if you want to perform an MX lookup.  Values are *YES and *NO.
  • use_ssl - Specify if your mail server requires SSL or TLS when sending email.  The valid values are *NO, *YES and *TLS (which will instruct MAILTOOL to send using TLS instead of just normal SSL).
  • smtp_port - Specify the port to use when sending email.  The default port is 25.  Other ports used are 465 (for SSL) or 587 (for TLS).
  • smtp_auth_user - If your server requires authentication, provide the user id here.
  • smtp_auth_password - If your server requires authentication, provide the password here.
  • bind_to_ip_address - Specify an IP address to bind the communications to.  
  • timeout - Specify the default timeout for socket communications.
  • ccsid - Specify the default CCSID to use for EBCDIC to ASCII translations.  The default is 819.
  • no_attachment_action - Specify the action to take if you specify an attachment and none are found.  The default is to take no action.  Specify *ERR if you wish MAITLTOOL to send an error.
  • body_content_type - Specify the body content type of the email.  The default is text/plain.  If you are sending HTML as the body, you'll want to change this to text/html.
  • mime_ccsid - Specify the CCSID of the temporary MIME file that is created.  The default is 819.
  • temporary_directory - Specify the directory to use for temporary and debug files.  The default is /tmp.
  • importance - Specify the importance of the email.  The valid values are normal, high and low.
  • priority  - Specify the priority of the email.  The valid values are normal, urgent and non-urgent.
  • recipient_separator - Specify the recipient separator to use.  
  • close_connection - Specify if you want to close the connection after sending the email.  The default is *YES.  You can also specify  *NO so that the connection will remain open for subsequent emails that are sent.
  • debug - Specify if you want debugging turned on (*YES) or off (*NO).
  • debug_file - Specify the name of the debug file to use.  The value /%id%/ can be used in the filename and will be replaced with a unique email ID.
  • debug_smtp_file - Specify the name of the SMTP trace file to use.  The value /%id%/ can be used in the filename and will be replaced with a unique email ID.
  • mime_file -  Specify the fully qualified path the the MIME file you wish to use.  The recipients and from address still need to be set when using this value.
  • ignore_blanks - Specify *YES if you want this function to ignore blank values when setting values, or *NO if you want it to set values that are blank.  This can be called before calling #mailtool_init();
  • configuration_file - Specify the fully qualified path and file name of the JSON configuration file to use.  This can (and should) be set before calling the #mailtool_init function.
  • save_email - Specify *YES to save the email, *NO to not save the email, or *DFT to use the default value stored in the MTPSAVE data area.  This is only valid with MAILTOOL Plus.
  • base64_encode_subject - Specify *YES to Base64 encode the subject.
  • base64_encode_message - Specify *YES to Base64 encode the message.  Please note any source for the message data should be UTF-8 (CCSID 1208).
Comments