cancel
Showing results for 
Search instead for 
Did you mean: 

Calling Cloud Connector from XSJS to send mail

0 Kudos

Hi All,

I have a requirement to call the Hana cloud connector from XSJS. Please let me know is it possible. The requirement is to sent mail from HANA xsjs through the sap cloud connector where the intranet mail server details are configured.

P.S : The intranet mail server cannot accesses as there is issue in whitelisting the IP ranges hence have to follow this approach.

Accepted Solutions (1)

Accepted Solutions (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Velraj,

Is your HANA box sitting in SCP or On-Premise?

If your HANA box is On-Premise, there is no sense on routing SMTP protocol through Cloud Connector. All you need to do is to call the SMTP server address directly. If it is not available to a HANA Box (not white-listed) because your server is an external resource, than you need to ask the administrator to white-list it or route the mail thru a trusted SMTP server (this is an option in SAP ABAP systems, take a look here and here).

If you HANA box is on SCP and you SMTP service is running On-Premise, then you may use Cloud Connector >= version 2.10. This version has a TCP configuration that could be used as forwarder to your local SMTP service (check this blog - even though this shows the config for SCI, you may use it as well for HANA XSJS programs). For HANA, you do it as usual referring the destination this way, except you use the virtual hostname and port as defined in the Could Connector.

Hope this helps!

Regards,
Ivan

former_member710476
Discoverer
0 Kudos

Hi Ivan,

I have use case exactly as you described :

  1. SCP NEO
  2. HANA on SCP
  3. Cloud Connector >2.10
  4. On premise SMTP

I tried to configure it according to materials you linked, but it does not work. When I create TCP Cloud to on Premise on SAP CC, I'm not able to use it later in xsjs. I'm not able to define destination in HANA including SOCKS5 proxy which seems to be necessary in case of TCP configuration.

Am I missing something?

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi maciej_z,

You don't need to configure a destination to use the mail js api. It reads the SMTP configuration from your HANA installation.

SMTP configuration in HANA Service on Neo is done via XS Admin tool.

Open your database URL and add the following suffix:

/sap/hana/xs/admin/index.html#/smtp

There, you will find a SOCKS Proxy configuration (where you could edit via Edit button):

All calls done to the xsjs mail api will be done against the smtp configuration.

Best regards,
Ivan

Answers (0)