Error when sending test email using policy manager - Unable to send email: Couldnt connect to host, port: mail, 25;
search cancel

Error when sending test email using policy manager - Unable to send email: Couldnt connect to host, port: mail, 25;

book

Article ID: 204388

calendar_today

Updated On:

Products

CA API Gateway API SECURITY

Issue/Introduction

When performing a test in the created policy, an error message pops up and an email is not sent.

Note: We are able to test this on another gateway server, using the exact same configuration. However, this server in particular does not send correctly. Error below:

Error message: 2020-11-17T11:14:45.836-0500 WARNING 636 com.l7tech.external.assertions.email.server.ServerEmailAssertion: 4: Unable to send email: Couldnt connect to host, port: mail, 25; timeout 30000. Exception caught!

Configuration:

Host: mail

Protocol: Plain SMTP

Port: 25

Format: Plain Text

Environment

Release : 9.4

Component : API GATEWAY

Resolution

"mail" appears as the default hostname on the Send mail Assertion :
documentation says :

The name of the outgoing mail server is displayed as the default. Modify if necessary. You may reference context variables.

ref:
https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/10-0/policy-assertions/assertion-palette/logging-auditing-and-alerts-assertions/send-email-assertion.html

You need to replace the "mail" value with your SMTP hostname to test successfully this assertion. If not done correctly, you will receive the error.

Error message: 2020-11-17T11:14:45.836-0500 WARNING 636 com.l7tech.external.assertions.email.server.ServerEmailAssertion: 4: Unable to send email: Couldnt connect to host, port: mail, 25; timeout 30000. Exception caught!