pub.client.smtp mailhost parameter

We are trying to replace the mailhost parameter which is being passed at the moment in the pipeline with a variable in the Extended setting. ( mail.smtp.host=aasmtp01.aaa.aa.aa.com )

The issue is we don’t want to change the code by unmapping the present mailhost mapping. If the mailhost entry is empty or null from the configuration file, it should pick up the value from the extended setting and send the email.

The problem is , if the mapping is removed in the code, it works by picking up the value from the extended setting, but if a mailhost tag is not supplied with a value in the configuration file, the extended setting value is not being picked up.

The SAG documentation says as below

mailhost String SMTP host name for outbound messages. For example:
smtp.webMethods.com
If no value is provided for the mailhost parameter, Integration
Server uses the value of the system property mail.smtp.host in the
startup.bat (startup.sh) file as the mailhost value.

what does no value mean ?? no mapping at all or does it include scenarios where a null value can be passed in the pipeline

Any ideas would be appreciated.

Not sure if it there is explicit check on the NULL but what is the java system property “mail.smtp.host” set at “custom_wrapper.conf” file?

The null check in the mapping does not have any effect. The mail.smtp.host is set to the correct email server in the server.conf file.

I did another test by passing as input the Mailhost value to the service. The result was as below

  1. When the checkbox include empty values for string types was checked, it did not pick up the extended setting value even though the input was blank

  2. The extended setting value was picked up and worked correctly when the checkbox was not checked.

So there is a setting in the Integration Server for this that needs to be changed I think. Not sure where this value can be found

IncludeEmptyvalues for string types

No value = no mapped, or mapped null.

Map an empty string is not no value, it is what happened when you check include empty value.