Hi bob, I did this as you have told, I don't need a template, so have removed the template part
var file =companyhome.childByNamePath("Guideline-Public-Expiry.csv");
var fileext= ".csv";
var mail = actions.create("mail");
mail.parameters.to = "";
mail.parameters.subject = "Monthly-Report on Expiry of Documents in Guidelines";
mail.parameters.from = "";
mail.parameters.text = "Hi,\Please find attached file of documents that will expire in next 2 months "+document.name;
mail.parameters.node_to_attach = file; // Here you set document to sent via email
mail.parameters.attachment_extension = fileext; // Here you set document extension
mail.execute(document);
please help, it is still not working