<commit_before>"use strict";

module.exports = function(imports) {

    let Promise = imports.modules.Promise;
    let nodemailer = imports.modules.nodemailer;
    let config = imports.config;
    let defaultConfig = imports.defaultConfig;

    let mail = {};

    // email transport
    mail.notify = nodemailer.createTransport({
        service: "Mailgun",
        auth: {
            user: config.mailgunUser,
            pass: config.<PASSWORD>gun<PASSWORD>
        }
    });
    Promise.promisifyAll(mail.notify);

    mail.sendEmail = function(options) {
        if (config.mailgunUser === defaultConfig.mailgunUser
            && config.mailgunPass === defaultConfig.mailgunPass
        ) {
            return new Promise(resolve => {
                if (process.env.NODE_ENV !== "test") {
                    console.log(options);
                }
                resolve();
            });
        } else {
            return new Promise(function(resolve, reject) {
                mail.notify.sendMail({
                    from: "MorTeam Notification <<EMAIL>>",
                    to: options.to,
                    subject: options.subject,
                    html: options.html
                }, function(err, info) {<commit_msg>Change recipients field to BCC (#47)<commit_after>"use strict";

module.exports = function(imports) {

    let Promise = imports.modules.Promise;
    let nodemailer = imports.modules.nodemailer;
    let config = imports.config;
    let defaultConfig = imports.defaultConfig;

    let mail = {};

    // email transport
    mail.notify = nodemailer.createTransport({
        service: "Mailgun",
        auth: {
            user: config.mailgunUser,
            pass: <PASSWORD>
        }
    });
    Promise.promisifyAll(mail.notify);

    mail.sendEmail = function(options) {
        if (config.mailgunUser === defaultConfig.mailgunUser
            && config.mailgunPass === defaultConfig.mailgunPass
        ) {
            return new Promise(resolve => {
                if (process.env.NODE_ENV !== "test") {
                    console.log(options);
                }
                resolve();
            });
        } else {
            return new Promise(function(resolve, reject) {
                mail.notify.sendMail({
                    from: "MorTeam Notification <<EMAIL>>",
                    bcc: options.to,
                    subject: options.subject,
                    html: options.html
                }, function(err, info) {
{'fraction_non_alphanumeric': 0.1104, 'fraction_numerical': 0.0008, 'mean_word_length': 1.6691568836712913, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '5282808', 'n_tokens_mistral': 663, 'n_tokens_neox': 626, 'n_words': 131}