I have a .Net 4.0 web app that contains some dynamic jquery charts and graphs I'd like to be able to email the current contents of a page to a logged in user without any of the functionality something like a printed page they could use for reference.
Basically I want to replicate the javascript window.print() function but email the contents.
I'd like to send the rendered webpage programmatically.
This might do it.
Convert the entire page to PDF
Then send the PDF as an attachment
http://www.codeproject.com/Articles/7089/Generate-PDF-documents-from-a-HTML-page-using-ASP
http://www.codeproject.com/Articles/5567/Create-and-manipulate-PDF-documents-100-NET
There is a solution in PHP so I don't know whether this will be of any use. You can use a templating library called Smarty and your normal HTML and Jquery/Javascript into the template and assign data to the variables within the template. And then you can use $smarty->fetch command to retrieve what would be outputted to the browser into a variable instead, and then send the content of the variable in the email.
This is what I do for some of my web apps that need to allow the user to modify the style or add coments via an ajax post.
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.