Home > Net >  Email highcharts pdf
Email highcharts pdf

Time:08-09

I managed to export multiple charts as pdf and download it on client side. Is there a way to email that pdf to email that user types. I was not able to find anything. I am using .net framework on server side.

Is it possible to send pdf to server using ajax and to send it to email from server that way?

CodePudding user response:

Assuming that you've got the PDF content and the email address to send it to from the client side, you can send email via .NET from your back-end server. This used to be done via the built-in SmtpClient class but Microsoft now recommends people to use other options like enter image description here

To build server side automatically using a browser the server needs generally to process it, just like a user, with say chrome --headless options for html2pdf (and chrome can do that in one line, but with limited user layout options). At that point you have a PDF for attachment by any conventional mime application/pdf means (e.g. convert to base64.txt)

  • Related