<commit_before>var email = require("mailer");

var _self = {
    
    sendEmail : function (data) {
        
        var errors = [];
        email.send({
            ssl: true,
            host : "smtp.gmail.com",
            port : 465,
            domain : "[127.0.0.1]", 
            to : data.to || '<EMAIL>',
            from : data.from || "<EMAIL>",
            subject : data.subject || 'no subject was provided',
            reply_to : "<EMAIL>",
            template : data.template, 
            data: data.data || {},
            authentication : "login",
            username : "<EMAIL>",
            password : "<PASSWORD>",
            debug: true
        },
        function (err, result) {
            if (err) {
                console.log(err);
                errors.push(['Email failed.']);
            }
        });
        
        return errors;
    },

    feedbackEmail : function (req, res) {
        var errors = [], errors2;
        req.onValidationError(function (msg) {
            errors.push(msg);
            return this;
        });
        
        req.sanitize('text').trim();
        req.sanitize('name').trim();
        
        errors2 = this.sendEmail({
            to : "<EMAIL>,<EMAIL>,<EMAIL>",
            subject : "Some feedback for us",
            template : "./email-templates/feedback.txt",
            data : { 
                text : req.param('text'), 
                name : req.param('name') + " " + req.param('email')
            }
        });<commit_msg>turning off email debugging.<commit_after>var email = require("mailer");

var _self = {
    
    sendEmail : function (data) {
        
        var errors = [];
        email.send({
            ssl: true,
            host : "smtp.gmail.com",
            port : 465,
            domain : "[127.0.0.1]", 
            to : data.to || '<EMAIL>',
            from : data.from || "<EMAIL>",
            subject : data.subject || 'no subject was provided',
            reply_to : "<EMAIL>",
            template : data.template, 
            data: data.data || {},
            authentication : "login",
            username : "<EMAIL>",
            password : "<PASSWORD>",
            debug: false
        },
        function (err, result) {
            if (err) {
                console.log(err);
                errors.push(['Email failed.']);
            }
        });
        
        return errors;
    },

    feedbackEmail : function (req, res) {
        var errors = [], errors2;
        req.onValidationError(function (msg) {
            errors.push(msg);
            return this;
        });
        
        req.sanitize('text').trim();
        req.sanitize('name').trim();
        
        errors2 = this.sendEmail({
            to : "<EMAIL>,<EMAIL>,<EMAIL>",
            subject : "Some feedback for us",
            template : "./email-templates/feedback.txt",
            data : { 
                text : req.param('text'), 
                name : req.param('name') + " " + req.param('email')
            }
        });
{'fraction_non_alphanumeric': 0.14891518737672585, 'fraction_numerical': 0.007232084155161078, 'mean_word_length': 1.2759910246821242, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6491102', 'n_tokens_mistral': 836, 'n_tokens_neox': 808, 'n_words': 175}