1

I don't really know if it is possible but I am creating a catalog in indesign using in5 plugin which converts the indesign in HTML using javascript and jQuery. In each page of that catalog have 6 products.

How can I make a button that, when clicked, opens the email client app (for example, Outlook) with the PDF of the specs and technical drawings of the product attached?

Please help me or point me in the right way.

Thank You

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
  • 3
    You can't specify an attachment of an email in client-side Javascript. You will need to do it server side - especially if the PDF is generated on the fly (ie. not a pre-existing document saved to the filesystem somewhere) – Rory McCrossan Jul 21 '21 at 16:21
  • 2
    Does this answer your question? [How to send an email from JavaScript](https://stackoverflow.com/questions/7381150/how-to-send-an-email-from-javascript) – Tibrogargan Jul 21 '21 at 16:26
  • thank you Rory what I am trying to do is something similar to this https://wetransfer.com/ – rogerio castro Jul 21 '21 at 17:00
  • Thank you for all your help. I really appreciate. I was not expecting a ready solution, but a answer of you guys saying what is not possible saves me time working on something that wont take me anywhere. Thanks a lot. – rogerio castro Jul 22 '21 at 08:17

2 Answers2

0

Honestly, if you want options on who you send the email to and what it contains, there's no magic HTML button that's going to just send an email for you.

If you plan on using JavaScript you should probably learn how to use NodeJS and the Nodemailer module. This will allow you to set up a server with which to create and send emails from on your site, not just open a pre-existing client.

Here's what you might want to see to get started. https://youtu.be/nF9g1825mwk Then when it comes to Nodemailer use this one because the last video is outdated. https://www.youtube.com/watch?v=h7wH7aEb8Ok

Dharman
  • 30,962
  • 25
  • 85
  • 135
-1

I don't know if this is quite accurate, but attempt this:

Make the button, so that it has a hyper reference(href) to the link to the app . You can use a container to send a message.

  • You can include a link to the pdf.