0

I need to send a vizframe to email, to achieve this I converted the chart into an image. but I am unable to add this image to my email.

I can do same thing for text but not for an image.

i.e.: new sap.m.Text({text: "stackoverflow"}).getText() does the job for me. any help will be highly appreciated.

Jaro
  • 1,757
  • 1
  • 15
  • 36
Armghn
  • 144
  • 2
  • 14

1 Answers1

1

UI5 only allows you to trigger the email client and pre-populate some plain text fields. You can check out the documentation for the URLHelper class.

If you also want to add an attachment (the picture), I don't think you will be able to. Check out this other question on StackOverflow: Automatically open default email client and pre-populate content. The only "good" way of doing it seems to be to just include a link towards your image inside the mail (assuming that the image is accessible via a URL).

Based on this question Press button, start native email program with attachment (located on webserver) it seems that some clients might allow you to specify the local path to the image (but in UI5 I don't see how you would know a path on the local machine).

Community
  • 1
  • 1
Serban Petrescu
  • 5,127
  • 2
  • 17
  • 34
  • I have the image in form of base64 url, but ms outlook doesn't support base64 url. so now I need to somehow put it as inline image in the email. – Armghn Apr 26 '17 at 14:15