Skip to content
Advertisement

How to export highcharts graph and send it by email?

I’m ussing highcharts in my project and I’m abit new in that. My problem is that how to get a capture of my chart and then send it by email? for email sending I’m ussing PHPMailer, the email works correctly. I searched in highcharts documentation they propose node export-server, but there is no example. I got some hints from internet but doesn’t work. I want, when I click on send chart by email button, it sould take the picture of chart and send it to email. So, can anybody kindly help me please with an example? A simple example of My code is bellow:

JavaScript

a screen shot of page look like this.
enter image description here

Advertisement

Answer

I want to answer myself:

  • We use html2canvas for taking an screenshot.
  • For sending email we use SMTPJS.

for email sending we use elasticemail provider, because SMTP accept only elastic email provider. Note: don’t forgate to import both smtpJS and html2canvas

JavaScript

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement