0

I would like to construct body of an email with excel as an attachment using MarkLogic and JavaScript. Excel should be generated from json response of rest API. I have been through docs but I could find sample for image attachment. Any help is appreciated!!

swat
  • 71
  • 7
  • It's not clear what you question is. Are you saying that you aren't sure how to adapt the examples demonstrating how to attach an image to an email and instead attach an Excel document? – Mads Hansen Nov 14 '22 at 12:25
  • Hi @MadsHansen thanks for replay!! I would like to attach excel file as an attachment – swat Nov 16 '22 at 07:33
  • Hi @MadsHansen I am able to send an email with an CSV attachment – swat Nov 16 '22 at 14:26
  • var contentType = "multipart/mixed; boundary=" + boundary; var att1 = xdmp.base64Encode(CSVData()); var part1 = "This is a sample message"; var part2 = { "Content-Type": "csv/text", "Content-Disposition":"attachment", "filename":"Notification.csv", "Content-Transfer-Encoding":"base64", "attachment":att1 }; – swat Nov 16 '22 at 14:30

0 Answers0