I am getting dynamic content on page load and sending it via mail using wp_mail(). Right now all contents going in body section of email but I want it to store in .doc(MS word) file and then send that file as an attachment.
I can send attachment via wp_mail(). But I am not getting any solution about how to auto create file and store all html content in file. I search a lot on google but couldn't find anything helpful. Is there any possible way of doing this in wordpress?