Skip to Content
author's profile photo Former Member
Former Member

How to send email from sap hana xs server using javascript

Hi All,

For my Thesis, i am developing an OData Service in HANA. Actually the Service is reporting Data from a set of Production lines. What i'm stuck with right now is how to send out alerts if expected figures within a time frame on a particular production line are not met.

So far i understand that it is not possible to send alerts from Hana Backend to Frontend(which will be a SAPUI5 App in my case). So what i intend to used is XSJS that will periodically compare actual figures with expected figures and if expected figures are not met, will send an email to the line Manager. But i just don't know how to generate emails with xsjs. This thread which appeared promising unfortunately leads to nowhere.

I will be very grateful if someone could guide me on how to accomplish this, or if there is another way at all of generating alerts/notifications from Hana Backend.

Thanks in advance

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 03, 2017 at 07:39 PM

    In XS Classic you can use the $.net.Mail API to send an email. Consider that the SMTP server settings have to be done (SMTP server configuration XS Classic).

    But according to your description, you should think about the usage of the XS Advanced programming model. With that you can do your backend implementation for instance with Node.js and use the available web-socket modules. So you would be able to send the required notifications directly to your UI5 app.

    Best Regards,

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.