I’ve tested with and without defining various email fields, but always populating the test email (required).
There is a single error message in the server log:
[ISC.0077.0004E] Exception during pub.client:smtp, type: javax.mail.MessagingException, msg: Could not connect to SMTP host: xyz.nowhere.com, port: 25
(hostname in the error string above is phony for this post)
At the command-line on the server hosting gateway, here are all the results of trying to figure out why the error occurs:
ping - successful
traceroute - shows the right route
telnet 25 - successful
curl - email successfully sends
Based upon this, it does not appear to be a network issue (firewalls, intrusion prevention, etc.) between the IS/GW host and the SMTP server.
Even more interesting, running pub.client:smtp directly on the IS instance hosting the GW works fine. The GW uses this service to send the email per the bolded text above.
The SMTP server is internal. It is an open relay. No username/pw needed to send mail.
It would appear that GW is doing something unexpected or requires something that I haven’t specified in the configuration when sending a test email. Any ideas from anyone are welcome.
When gateway makes the call to pub.client:smtp, it is passing this (captured pipeline below, with company specifics changed to protect the guilty ):
<?xml version="1.0" encoding="UTF-8"?>
<IDataXMLCoder version="1.0">
<record javaclass="com.wm.data.ISMemDataImpl">
<value name="mailhost">mailhost.xyz.com</value>
<value name="mailhostPort">25</value>
<value name="subject"> API Gateway transaction event from : ahost.nowhere.com</value>
<value name="body">The transaction event parameters from the API Gateway Metrics and Event Notification engine are:
(snipped most of the email body, which is not important for this)
Note: This is a test email from API Gateway. Please do not respond to this email.</value>
<value name="from">noone@nowhere.com</value>
<value name="to">noone@nowhere.com</value>
<record name="secure" javaclass="com.wm.data.ISMemDataImpl">
<value name="transportLayerSecurity"></value>
<value name="trustStoreAlias"></value>
</record>
<value name="fileName">pub.client.smtp.xml</value>
</record>
</IDataXMLCoder>
It is the empty transportLayerSecurity value that causes the failure. The docs indicate the default is “None” but when calling and the field is explicitly specified it must contain one of the 3 supported values.
Using Designer to invoke the service directly, rather than from the GW UI, omitting the field completely works as expected. Setting explicitly to “None” works as expected. Seems like a possible bug in API GW – seems like it should omit the “secure” doc or set transportLayerSecurity to “None”. Will open a support ticket.