简体   繁体   中英

how do I process dynamically generated graph with PHP and send the result as an email?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM