I have an API which gives me path to a file http://bts.myurl.com/ThisIsMyPdf.pdf
.
Now I have a button which onto clicking share this file to users via mail. This is the code which i have used for sending the report:
var filePath = "http://bts.myurl.com/ThisIsMyPdf.pdf";
Utilities.SendEmail("MyId@gmail.com", "subject", "To@gmail.com", "", "", "body", filePath);
But this is giving exception as URI Formats are not supported.
Some other approaches include the file to be download first before sending as attachment but again i don't want it to be downloaded.
I believe there are other ways to achieve this, if any please share.