Configure SMTP/Admin Emails
This section provides the information for the SMTP configuration with the ML setup taking the tool fake SMTP to test SMTP/admin emails for portal notifications.
Download the Fake SMTP and Start the Fake SMTP Service:
FakeSMTP is a Free Fake SMTP Server with GUI for testing emails in applications easily. It is written in Java.
Setup:
- Download the fake SMTP jar from http://nilhcem.com/FakeSMTP/download.html.
- Go to the Downloaded jar folder and start the fake SMTP service: http://nilhcem.com/FakeSMTP/download.html
- Star the fake SMTP service with the command: java -jar fakeSMTP-2.1-SNAPSHOT.jar
- A service will start as follows.
SMTP setup on ML Cluster
- Get the IP and port and other required information for the SMTP server.
- Logon to the TIBCO Cloud™ API Management - Local Edition CM container.
- Go and open the properties file at the location on cm container: /opt/mashery/containeragent/resources/properties/tml_cm_properties_final.json
- Update the following property values. :
"smtp_host" : "SMTP host server ip address"
"smtp_port" : "port on the SMTP server listening"
"smtp_user" : ""
"smtp_password" : ""
"smtp_useTls" : "false"
eg :
"smtp_host" : "10.98.50.160"
"smtp_port" : 1024,
"smtp_user" : ""
"smtp_password" : ""
- Start the jetty service on CM container using the command: service jetty restart
- Test the SMTP service by making a curl call from the CM node: if the SMTP server is correctly configured then there should be mails in the SMTP server.
curl -X POST \ http://localhost:4080/tml-mail/api/v1/mail/json \ -H 'Content-Type: application/json' \ -H 'Postman-Token: 89088130-7ddb-433e-a005-7a907e0855ff' \ -H 'cache-control: no-cache' \ -d '{ "sender":"ankitjaisender@tibco.com", "ccRecipients":["cc@tibco.com"],"bccRecipients":["bcc@tibco.com"],"recipients":["to@tibco.com"], "subject":"test subject", "body":"testing out mails service" }'
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.