nodemailer for data:text/csv;charset=utf-8

Hi I have a URI in the form of data:text/csv;charset=utf-8,PAGE_GROUP,pageviews%0D%0Ap%2Fgen%2Flogin-proce....... and when I click on this URI it downloads a csv. However now I am trying to use nodemailer to email the CSV as an attachment but running into some problems. The CSV successfully creates, but it seems like nodemailer has trouble parsing the data URI correctly. It keeps all of the gibberish that it should decode

So for example, instead of having

PAGE_GROUP,pageviews p/gen/login-processing::_login-processing, 41,543,907 main:mktg:personal::home, 35,449,109

IT has

PAGE_GROUP,pageviews%0D%0Ap%2Fgen%2Flogin-processing%3A%3A_login-processing,%2241%2C543%2C907%22%0D%0Amain%3Amktg%3Apersonal%3A%3Ahome,%2235%2C449%2C109%22%0D%0Amain%3Awalletweb%3Asummary%3A%3Ahome,%2234%2C766%2C382%22%0D%0ALog%20In,

for some reason, as you can see it doesn't actually decode the URI at all.My nodemailer code is below. Thanks

// setup e-mail data with unicode symbols
 var mailOptions = {
    from: results.send, // sender address
    to: results.recieve, // list of receivers
    subject: results.subject, // Subject line
    text: results.message, // plaintext body
    attachments: [
     {
        filename: "tableData.csv",
        content: new Buffer('PAGE_GROUP,pageviews%0D%0Ap%2Fgen%2Flogin-proce.......', "utf-8"),
         contentType: "text/csv"
    }]

};

Where inside of the new Buffer() is the entire URI corresponding to the data:text/csv link.