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 CA API Gateway Precision API Monitoring Module for API Gateway (Layer 7) CA API Gateway Enterprise Service Manager (Layer 7) STARTER PACK-7 CA Microgateway

Issue/Introduction

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

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 default host name on the Send mail Assertion :
documentation says :

The name of the outgoing mail server 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

Do you need to replace "mail" value by your smtp hostname to test successfully this assertion, else you will receive the error you are reporting.

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!