cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Mail From UI5 Application upon Button click...

Pavan24
Explorer
0 Kudos

Hi Experts,

I want to send a mail upon a button click . but i am getting a mail compose while using the sap.m.UrlHelper .

Please share me the solution , if anyone tried this.

Thanks & Regards,

Pavan.

Accepted Solutions (0)

Answers (1)

Answers (1)

sajid-khan
Explorer
0 Kudos

but i am getting a mail compose while using the sap.m.UrlHelper .

You're getting an email compose window because that's what sap.m.UrlHelper is supposed to do. Ui5 alone (or "Javascript alone" to be more specific) is not capable of sending an email directly on its own. All that Ui5 can do is open compose mail window of your OS's default email client and put the subject/body/content in it. Rest is up to the user if they want to send that email by clicking send button or not.

If you want your app to directly send email with one click (without further interaction from user or without opening email compose window) then you need to implement it in backend. For example, you can create a function import which sends email in the backend. the Function import can then be called by your Ui5 app using HTTP.

Regards

Sajid Khan