如何使用PHP处理动态生成的图形并将结果作为电子邮件发送?

I am trying to send mail using phpmailer, so my function which is returning body of mail,is like :

function get_include_contents(){
// some code
 include "graph.php"
  //some code<br/>
}

"graph.php" file is actally generating a table and graph (i am using highchart.js) ,

when I run my file to send mail , I am getting table only (which is generated in php). I am not getting graph(which is geneated in by javascript).

How should I display graph in mail ?

Imho you're best shot is to make a pdf out of the graph.php page and use that pdf as an attachment in your email. This process has been discussed here Print a webpage to pdf document using php