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:
  1. Download the fake SMTP jar from http://nilhcem.com/FakeSMTP/download.html.
  2. Go to the Downloaded jar folder and start the fake SMTP service: http://nilhcem.com/FakeSMTP/download.html
  3. Star the fake SMTP service with the command: java -jar fakeSMTP-2.1-SNAPSHOT.jar
  4. A service will start as follows.

SMTP setup on ML Cluster
  1. Get the IP and port and other required information for the SMTP server.
  2. Logon to the TIBCO Cloud™ API Management - Local Edition CM container.
  3. Go and open the properties file at the location on cm container: /opt/mashery/containeragent/resources/properties/tml_cm_properties_final.json
  4. 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" : ""

  5. Start the jetty service on CM container using the command: service jetty restart
  6. 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" }'